我正在使用这样的 winforms 创建邮件:
private void CreateOutlookEmail(string addresses)
{
try
{
Outlook.Application outlookApp = new Outlook.Application();
Outlook.MailItem mailItem = (Outlook.MailItem)outlookApp.CreateItem(Outlook.OlItemType.olMailItem);
mailItem.Subject = "This is the subject";
mailItem.To = addresses;
mailItem.Body = "This is the message.";
mailItem.Importance = Outlook.OlImportance.olImportanceLow;
mailItem.Display(false);
}
catch (Exception eX)
{
throw new Exception("cDocument: Error occurred trying to Create an Outlook Email"
+ Environment.NewLine + eX.Message);
}
}
是否可以从 winforms 应用程序中将电子邮件地址/主题实际插入保存的 Outlook 模板(.oft 文件)?
OFT 文件将位于应用程序的根目录中。