通过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();
posted on 2018-02-03 11:41 lanyue52011 阅读(486) 评论(0) 编辑 收藏 举报