locked
Problem with SQL Server 2016 email notifications RRS feed

  • Question

  • Hi all,

    I have correctly installed and configured SQL Server 2016. Then I configured email settings. But if I want to send emails to another domain, email is not sent with this error:

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2016-10-13T14:07:59). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.54 SMTP; Unable to relay recipient in non-accepted domain).

    From other systems, there are no problems to send same test email. We also tried to reconfigure email settings and tried to set SSL connection, or set Basic authentication, or anonymou authentication, but nothing helped. Exchange server is correctly configured, because DPM is using same Exchange server and everything is configured same, dpm reports are correctly delivered.

    Thursday, October 13, 2016 12:14 PM

Answers

  • Your message indicates that the SQL Server you cannot send email from is able to reach the smtp server or the smtp relay successfully, but is not able to send emails from there. It further says that the message it is getting back from the recipient is that the mailbox is unavailable.

    There are several possibilities.

    The problem SQL Server is not configured to send email correctly - you need to check the mail account and profile to see if this is correct and the same as the working SQL Server. You also need to check to see if this problem server can send any mail at all, or do just a few recipient email accounts fail.

    querying:

    select * from msdb.dbo.sysmail_sentitems order by mailitem_id desc

    Will help you to determine this.

    The smtp relay or the smtp server is for some reason unable to send your emails. You need to check to settings on your smtp server or smtp relay. Check outbound security.

    The messages from the above problems make me suspect that the above two possibilities are unlikely.

    However the message clearly indicates you are sending to an invalid mailbox. I think you should try to send email to your personal account to see if this works.

    Friday, October 14, 2016 12:38 PM

All replies

  • It seems might be DNS issue, please check below link:

    http://searchexchange.techtarget.com/answer/Why-cant-I-send-mail-outside-my-organization

    Also, it needs to be validated that the emil id from which you are sending emails has all required access, some time organization put some restriction. Please check.

    Some more pointers:

    http://www.sqlservercentral.com/Forums/Topic396477-146-1.aspx

    Hopefully SMTP access is here for the server.

    Some basic validation ways:

    http://sqlmag.com/blog/configuring-and-troubleshooting-database-mail-sql-server


    Santosh Singh

    Thursday, October 13, 2016 1:59 PM
  • You have a problem which is confined to this box. It is saying that it can't send the mail to a specific email address. Can you try it with a known email address that does exist.

    Also it looks like you are doing a relay - you may have an smtp server in the mix or an smtp relay server in the mix which may not access emails from your server or from the account on your server. You need to check them.

    Query the mail log to see if any mail is coming out on that server. IE

    select * from msdb.dbo.sysmail_sentitems

    Thursday, October 13, 2016 2:05 PM
  • Hi all,

    thanks for the answers, but let me specify this problem. In the same domain, there is another server, which is using same SMTP with same settings, and everything is functioning correctly. But from SQL Server 2016, I can't send email to for example group, or  external email addresses.

    Friday, October 14, 2016 11:59 AM
  • Your message indicates that the SQL Server you cannot send email from is able to reach the smtp server or the smtp relay successfully, but is not able to send emails from there. It further says that the message it is getting back from the recipient is that the mailbox is unavailable.

    There are several possibilities.

    The problem SQL Server is not configured to send email correctly - you need to check the mail account and profile to see if this is correct and the same as the working SQL Server. You also need to check to see if this problem server can send any mail at all, or do just a few recipient email accounts fail.

    querying:

    select * from msdb.dbo.sysmail_sentitems order by mailitem_id desc

    Will help you to determine this.

    The smtp relay or the smtp server is for some reason unable to send your emails. You need to check to settings on your smtp server or smtp relay. Check outbound security.

    The messages from the above problems make me suspect that the above two possibilities are unlikely.

    However the message clearly indicates you are sending to an invalid mailbox. I think you should try to send email to your personal account to see if this works.

    Friday, October 14, 2016 12:38 PM
  • Hi Peter,

    Relay should allow for another domain for SMTP

    http://www.msexchange.org/articles-tutorials/exchange-2016-articles/management-administration/mail-relay-exchange-server-2016.html


    Please click Mark As Answer if my post helped.

    Friday, October 14, 2016 1:01 PM