在EWS中调用SendAndSaveCopy方法时,出现服务器响应返回无效xml的错误。
我已经浏览了几页EWS文档,但还没有能够解决任何问题。我尝试启用跟踪标志,但只显示.asmx页面的html。
我该如何解决这个问题?
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
service.Url = new Uri("http://mex07a.emailsrvr.com/ews/Exchange.asmx");
service.Credentials = new WebCredentials("myname@mydomain.com", "mypassword","mydomain.com");
EmailMessage message = new EmailMessage(service);
message.Subject = "Interesting";
message.Body = "The proposition has been considered.";
message.ToRecipients.Add("name@mail.com");
message.SendAndSaveCopy();
注意:" http://mex07a.emailsrvr.com/ews/Exchange.asmx"链接已经过验证,直接发送到我的电子邮件页面。