I'm trying to configure Database Mail on a new server and have configured it exactly as my other servers but it's not working. This is on a SQL Server 2008 Enterprise x64 instance.
In the Database Mail logs, my test emails generate the following message:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2010-02-15T16:58:54). Exception Message: Could not connect to mail server. (A non-recoverable error occurred during a database lookup). )
I did a test by connecting to the SMTP server with telnet and sending a test email that way and it worked fine.
Does anybody have any suggestions for troubleshooting?
also do you have any anti virus programs running? if yes, it blocks services from sending on TCP-25 (like an email worm). Adjust the anti virus software accordingly. Add DATABASEMAIL90.EXE to the list of allowable programs in your anti virus program
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
Are the firewall ports open between the server and the mail server? Double check that any anti-virus isn't stopping the messages.
Also, from the SQL Server try telnetting to the mail server to check a connection. type [telnet Server 25] (or whatever port it uses) from a command prompt.