通过ExchangeService|通过ExchangeService 发送邮件


ExchangeService service = new ExchangeService();
service.Url = new Uri("https://***(host)/ews/exchange.asmx");
service.Credentials= new WebCredentials("username", "password");

//service.AutodiscoverUrl("ssss@xxxx");

EmailMessage message = new EmailMessage(service);
message.Subject ="主题";
message.Body ="内容";
message.ToRecipients.Add("email");
message.ToRecipients.Add("email");
message.Save();
message.SendAndSaveCopy();

【通过ExchangeService|通过ExchangeService 发送邮件】下载(包含Microsoft.Exchange.WebServices.dll)
转载于:https://www.cnblogs.com/lanyue52011/p/8408983.html

    推荐阅读