Wednesday, October 10, 2012

Database MAIL( sp_send_dbmail) Error in SQL2008 R2:


The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2012-08-31T18:10:23). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay). 

While sending mail from SQL job through sp_send_dbmail procedure in SQL2008R2, i am getting above error.2 identical emails are send (with same distribution list and same body), with one minute of difference.

Resolution:

One of the email id in the recipients causing the above issue. So I have resolved that issue by changing the wrong mail id in the recipients list to correct mail id.

Eg .(if SMTP server related to your office smtp server. Then sp_send_dbmail will not send mail to another office server mail id in the recipients list.)

1 comment:

  1. I get the same problem (mail sent twice at about a minute apart) when I am auto-sending mail to individuals (one address per call to sp_send_dbmail). Any ideas what might cause that?

    ReplyDelete

MYSQL:::Seamless Data Archiving: Exporting, Importing, and Pruning MySQL Tables

  Seamless Data Archiving: Exporting, Importing, and Pruning MySQL Tables Introduction: In the dynamic landscape of database management...