我正在尝试使用 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”
帮助?