Hi all,
I need to send some emails generated with C# code, by using EWS (exchange web service).
Microsoft gives this example of code, but it doesn't work on my side; and the code doesn't contain any host and no domain for the Exchange 2010 server (my C# code is not in the same domain than the Exchange server).
The Microsoft example crashes saying "The Autodiscover service coundn't be located"
if (userData.AutodiscoverUrl == null) { service.AutodiscoverUrl(userData.EmailAddress, RedirectionUrlValidationCallback); => Exception : "The Autodiscover service couldn't be located." userData.AutodiscoverUrl = service.Url; } else { service.Url = userData.AutodiscoverUrl; } private static bool RedirectionUrlValidationCallback(string redirectionUrl) { bool result = false; Uri redirectionUri = new Uri(redirectionUrl); if (redirectionUri.Scheme == "https") { result = true; } return result; }
Eric