我正在尝试通过交换网络服务发送邮件。我查看了msdn并找到了一些帮助。每次我尝试运行此代码时,我都会收到上述错误:(我几乎在任何地方都尝试阅读...
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Credentials = new WebCredentials("My user name", "my pass");
System.Net.ServicePointManager.ServerCertificateValidationCallback =
((sender, certificate, chain, sslPolicyErrors) => true);
service.Url = new Uri("my web service url.WSDL");
EmailMessage appointment = new EmailMessage(service);
appointment.Subject = "Test by me";
appointment.Body = "DateTime.Now";
appointment.ToRecipients.Add("xxxxxxx@gmail.com");
appointment.SendAnd
SaveCopy();