<cite>aaron: </cite> Duplicate of #3962@b1758ffc-c5d6-4949-bfc8-a9bc10b108f6
This is misleading answer. I should not change the code in order to make it work.
The very basic code I've tested worked perfectly!
SmtpClient client = new SmtpClient("smtp.office365.com", 587);
client.UseDefaultCredentials = false;
client.Credentials = new NetworkCredential("[mail]", [password]");
client.EnableSsl = true;
MailMessage mailMessage = new MailMessage();
mailMessage.From = new MailAddress("[mail]");
mailMessage.To.Add("[email protected]");
mailMessage.Body = "body";
mailMessage.Subject = "subject";
client.Send(mailMessage);
Should I replace your code with this to make it work!
Thanks, working!