Database Mail Exception 5.7.1

I had an issue setting up Database Mail today: I copied the details from a server that had Database Mail setup and running successfully. After spending an age confirming that the database was set up correctly, I queried the sysmail_event_log table to get the full error:

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

Although it looks like that there is an issue with the account that we’re trying to send the message to, this is not actually the case: The Exchange Server requires a new Receiver Connector to be created so that the Exchange server can relay messages from the server. A 5.7.1 error usually indicates that there are issues with relaying through the Exchange server because the IP of the SQL Server box is not configured for SMTP relay. You need to contact your Exchange Admin to get a receive connector setup.

Author: Richie Lee

Full time computer guy, part time runner. Full time Dad, part time blogger. Knows a thing or two about Pokémon. Knows too much about SQL Agent. Writer of fractured sentences. Maker of the best damn macaroni cheese you've ever tasted.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s