databasemail.exe not triggered after updating sql server 2017.

New Contributor

Good day All,

 

After a certain update installed on my Microsoft SQL server 2017 my database mailing no longer works. I installed the latest CU 5 for sql server 2017 as this was suggested to resolve the issue online. After installing the update the databse mailing still didn't work. However I noticed that before I did the update the emails will go out if I manually open the databasemail.exe now I was receiving a dot net 4 not installed error message

 

I have also tried changing the content of databasemail.exe.config file to: 

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="DatabaseServerName" value="." />
<add key="DatabaseName" value="msdb" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

 

The mails in the q is then send out but once I close it or it closes after 5 seconds closes by itself, and try  sending a mail from sql without manually opening databasemail.exe they just stay in the q. The mail log also only shows service started and service ended, wish I believe happens when I manually open the databasemail.exe.

 

Many Thanks.

1 Reply

Good day All,

 

I have resolved the issue after having a look on "https://social.technet.microsoft.com/Forums/sqlserver/en-US/fb23d109-00ef-4db6-99e7-19d1146ada5b/ser...". The person said his issue have been resolved by removing a conflicting entry in the server's hosts file.

 

I would just like to clarify his answer.

 

You navigate to "C:\Windows\System32\drivers\etc" and open the hosts file.

 

Remove all extra entries that have been made and save the file. Then your emails should go out. You may off cause now reinsert your entries one by one to determine which one caused the issue.