0

我正在使用这样的 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 文件将位于应用程序的根目录中。

4

1 回答 1

1

您的意思是您需要修改现有的 OFT 文件吗?您可以使用Redemption及其RDOSession .GetMessageFromMsgFile来做到这一点

于 2013-05-18T17:35:32.230 回答