SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Database Mail
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Vack
Constraint Violating Yak Guru

USA
497 Posts

Posted - 01/14/2013 :  11:44:13  Show Profile  Reply with Quote
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).

Edited by - Vack on 01/14/2013 11:59:46

Vack
Constraint Violating Yak Guru

USA
497 Posts

Posted - 01/14/2013 :  11:59:17  Show Profile  Reply with Quote
I was able to figure this out. The profile name was changed from 'ETM Mail' to 'ETM'.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000