5.7.57 SMTP – Client was not authenticated to send anonymous mail during MAIL FROM error

@Reshma- In case you have not figured it yet, here are below things that I tried and it solved the same issue.

  1. Make sure that NetworkCredentials you set are correct. For example in my case since it was office SMTP, user id had to be used in the NetworkCredential along with domain name and not actual email id.

  2. You need to set “UseDefaultCredentials” to false first and then set Credentials. If you set “UseDefaultCredentials” after that it resets the NetworkCredential to null.

Hope it helps.

Leave a Comment