C# SMTP fails to authenticate on Outlook.com, port 587. "The server response was: 5.7.1 Client was not authenticated"
I know that it sounds weird but AFAI remember you should use the UseDefaultCredentials = false
before setting Credentials
. change your code to:
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential(From, Password);
Comment out UseDefaultCredentials worked for me, see Microsoft Bug: https://connect.microsoft.com/VisualStudio/feedback/details/725279/smtp-tls-authentication-usedefaultcredentials-bug-using-office365-server-as-smart-host