我正在尝试使用Exchange Web服务发送电子邮件。
以下是代码:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Url = new Uri("https://mail.mydomain.com/ews/Exchange.asmx");
service.Credentials = new WebCredentials("Username", "Password", "Domain");
EmailMessage message = new EmailMessage(service);
message.Subject = "SEND!";
message.Body = "Please work.";
message.Sender = new EmailAddress("myemailaddress@mydomain.com");
message.ToRecipients.Add("myemailaddress@mydomain.com");
message.Save();
message.SendAndSaveCopy();
但我收到以下错误:
“请求的邮箱不支持指定的RequestServerVersion”
帮助?