0
我創建使用的WinForms像這樣一個郵件:C#的WinForms從Outlook模板文件創建電子郵件
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);
}
}
是否有可能實際上是插入的電子郵件地址/主題爲從保存的Outlook模板(.OFT文件)在一個winforms應用程序?
OFT文件將位於應用程序的根目錄中。
這看起來正確。將研究它。謝謝 –