SQL SERVER – Database Mail Error: The SMTP Server Requires a Secure Connection or the Client Was Not Authenticated. The Server Response Was: 5.5.1

I am an avid fan of Pinal Dave’s blog, it has been one of my go to blogs as a SQL DBA.

When he blogged about a DB mail issue with the 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. Further analysis of the package revealed 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

https://blog.sqlauthority.com/2018/06/30/sql-server-database-mail-error-the-smtp-server-requires-a-secure-connection-or-the-client-was-not-authenticated-the-server-response-sas-5-5-1/

https://blog.sqlauthority.com/2018/07/04/sql-server-database-mail-error-the-smtp-server-requires-a-secure-connection-or-the-client-was-not-authenticated-the-server-response-was-5-5-1-using-gmail/

Advertisements