I am an avid fan of Pinal Dave’s blog, it has been one of my go to blogs throughout my career as a SQL DBA. He has covered almost everything in the realm of SQL Server.
Recently when he blogged about a DB mail issue with this specific error message, I remembered facing a similar issue in one of our servers.
In our case a SQL Server job with SSIS Package designed to send mails to development team was failing with below error.
The SMTP Server Requires a Secure Connection or the Client Was Not Authenticated. The Server Response Was: 5.5.1
Server had multiple jobs using Database mail and only one was encountering this error. Digging deeper found out that while successful jobs had part of connection string as ‘EnableSSL= True’.
The job that was failing had connection string set as ‘EnableSSL = False’
Fixing the connection string fixed the job and it was running successful.
For more fixes related to this error message see Pinal’s blog posts