请求的邮箱不支持指定的RequestServerVersion

时间:2012-07-19 18:27:16

标签: email send exchangewebservices

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

帮助?

0 个答案:

没有答案