Wise man or Wise guy? You Decide

Just another WordPress.com weblog

Mystery of Failing Database Mail

Posted by sqlwiseguy on July 21, 2009

Have you ever seen this error when you have setup database mail:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using [Account] ([TimeSent]). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it

I have, and so have a few others based on my experience in the forums.  If you are like me, you immediately contacted you mail server administrator to find out why the mail server is refusing your mail.  Then once, they told you that there was nothing on the mail server that should be causing this, you tried using GMAIL/Hotmail and got the same error.  Now what do you do?  Fortunately for me I had a production server setup and working so decided to investigate differences.  Lo and behold, I found antivirus software installed on my desktop, but not on the server (let’s save that discussion for another time) So I looked in the antivirus log and, sure enough, mail being sent by database was being blocked by the “prevent mass-mailing worms” rule.  So I disabled the rule, and, viola!, mail sent successfully.  Of course the corporate antivirus policy almost immediately re-enabled the rule, but I had an answer.  I contacted my corporate antivirus administrator and had them add DatabaseMail90.exe (SQL Server 2005) to the exceptions list.

So if database mail is not working, check your antivirus settings.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: