SQL Database Mail not sending error ” The mail could not be sent to the recipients because of the mail server failure.Cannot send mails to mail server”

Hi friends, One day morning I was configuring SQL Database Mail in SQL Server 2014 installed on my laptop.I tried to send SQL test mail but when i login into my gmail account and checked inbox ,i couldn’t find any mail.So i checked Database Mail log to find error message.

” The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1. Exception Message: Cannot send mails to mail server. (The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at).) ”

So i planned to fix SQL Mail error using below steps

Step 1.Make sure that you have configured SQL Database Mail in proper way.Please check each steps as explained in my another blog

SQL Database Mail Configuration in SQL Server Step by Step

Step 2.You have to give valid mail id as User name and correct Password in in Password and Confirm password columns at the time of mail configuration

SQL Database Mail not Sending error Gmail Account

Step 3.Make sure that you have ticked The server requires a secure connection(SSL) as shown in the below picture

It is the fix for “The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required” error message .

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required

Step 4.If above three steps not working in your SQL Database Mail ,Please log into sending email id and check that you got a Gmail critical security alert mail as shown below

SQL Database Mail  test mail not sending error fixed in Gmail account

Please open above mail and Click on Check activity button

The mail could not be sent to the recipients because of the mail server failure. Cannot send mails to mail server


You may click on Yes,it was me as shown in below image

SQL Database Mail not sending error fixed SQL test mail not getting in  Gmail account

Now please send SQL test Mail again and check it weather it works .if you still get same error, go to next step

Step 5.Make Less secure app access to ON State in your Gmail account(sending email id )

1. Login in to Gmail

2.Switch Allow less secure apps to ON state

SQL Mail not working in SQL Server 2017 and fix SQL Mail not sending error solutions

Now Check by sending a test mail from your SQL Database Mail using your Mail Profile .

I hope any of five steps mentioned above will help your Database Mail not sending error problem.If you have any alternate solutions please comment below .it will help a lot of SQL DBA students around the world

Leave a Reply

Your email address will not be published. Required fields are marked *