2

I am trying to figure out something.

I have a Stored Procedure that is executing the sp_send_dbmail system stored procedure to send an email through our open relay (locked down to the IP address of the SQL Server) on our exchange server.

We are BCC on every email sent by this Stored Procedure and we receive them just fine. When I check the select * from msdb..sysmail_allitems it shows the last 12 emails sent as "failed". That table shows the following error note:

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 5 (2015-08-26T11:20:10). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay). )

When we were testing the system, the sent_status was showing "sent". When we first went live, it was also showing "sent". Now it is showing "failed" on every new email that is processed.

Any recommendations on where I can look to resolve this issue?

Thanks, jlimited

jlimited
  • 685
  • 2
  • 11
  • 20
  • 1
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/3b17b092-f734-4c24-bb7b-ee1bbe15e46d/mailbox-unavailable-the-server-response-was-571-unable-to-relay?forum=csharpgeneral – Lukasz Szozda Aug 26 '15 at 16:53

2 Answers2

0

The attached article was helpful in resolving the issue.

Found that the email profile was configured incorrectly and was sending only to internal addresses.

jlimited
  • 685
  • 2
  • 11
  • 20
0

unable to relay in Exchange Server

Launch Exchange Server Manager and move to Administrative Groups.

Select Administrative Group Name then choose Server>Server Name.

Now click on Protocols and Select SMTP.

Right-click on Default SMTP Virtual Server and select Properties

In Access tab, click on Relay>only the list below

Now check the checkbox “Allow all systems to successfully authenticate to relay regardless of the list above” and close.

Still any issue contact your server team for permission.

Vishe
  • 3,383
  • 1
  • 24
  • 23