I have setup database mail on a SQL server 2008 R2 machine. I setup the following job last year and it ran fine all year up until 12/7/2012.EXEC msdb.dbo.sp_send_dbmail @profile_name = 'ETM Mail', @recipients = 'Troy.mail.com, @query = 'select item_no, loc, qty_on_hand from [001].dbo.iminvloc_sql where qty_on_hand < 0' , @subject = 'Negative Invenotry', @attach_query_result_as_file = 1 , @query_attachment_filename = 'NegativeInventory.txt';
I can send a test email fine. I receive it within a few seconds. But if I try to send an email using EXEC msdb.dbo.sp_send_dbmail I eventually get the following message. The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2013-01-14T11:40:04). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.133.109:25).