eagleshi 发表于 2015-9-14 07:33:30

Use Outlook to send email

  Microsoft.Office.Interop.Outlook.Applicationapp = new Microsoft.Office.Interop.Outlook.Application();
NameSpace ns = app.GetNamespace("mapi");
ns.Logon("", "", false, true);
MailItem message = (MailItem)app.CreateItem(OlItemType.olMailItem);
message.To = toAddress;
message.Subject = subject;
message.HTMLBody = mailBody;
message.Send();
ns.Logoff();
页: [1]
查看完整版本: Use Outlook to send email