Error/Fix: Database Mails using Gmail getting to Unsent Items

Recently I tried to setup Database Mail profile in SQL Server 2016 instance using 2-Step authenticated GMail account. Even after setting up mail profile as per standard configuration (same as other instances), the mails sent from SQL Server were queued in msdb..sysmail_unsentitems . Worst part here was that there were no errors in the Database Mail log, the SQL Agent log or even the SQL Server error log. Even after going through all the usual steps to troubleshoot Database Mail in SQL Server 2016, I had no success.

Resolution:
Even though SQL Server 2016 installation does not need .Net 3.5 Framework as a pre-requisite, Database Mail feature of SQL Server still require it. I came to find it hard way when I tried to start DatabaseMail from MSSQL\Binn directory. This resolved the issue for me. Below are few resources for setting up mail profile in SQL Server using GMail account.

Friends, please feel free to correct me by comments. If you like the article, do Like & Share. Happy Coding 🙂

Leave a Reply