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]