setting up DBMail

  • Hi. I am setting up database mail for the first time and have gotten test emails to go to the queue, but they don't send out. I am getting this generic error: The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2017-02-07T12:28:22). Exception Message: Cannot send mails to mail server. (Failure sending mail.).
    )
    I have checked that mail is running, the advanced options are configured. I am a SA on the box and just don't know where to go next...
  • kristinadba - Tuesday, February 7, 2017 12:26 PM

    Hi. I am setting up database mail for the first time and have gotten test emails to go to the queue, but they don't send out. I am getting this generic error: The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2017-02-07T12:28:22). Exception Message: Cannot send mails to mail server. (Failure sending mail.).
    )
    I have checked that mail is running, the advanced options are configured. I am a SA on the box and just don't know where to go next...

    Check the sysmail table in msdb. It should give you a more detailed message and any reasons for SMTP server errors. You could just do something like:

    select log_date, description
    from dbo.sysmail_event_log
    where event_type like 'error'

    and check the description column for more details.

    Sue

  • I'd check with the admin of your e-mail system to see if the SQL Server needs to be whitelisted or anything to allow sending SMTP e-mails (which is what database mail uses).  I've worked at a number of places where that was a requirement.

  • Thanks! Sue - the error was what I posted first. Checking with my email admin now. I am hoping that it is on the SMTP end as I am pulling out hair at this point.

  • got this now that they white listed our server: The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2017-02-07T14:23:11). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for xx@jcompany.com).
    )

  • kristinadba - Tuesday, February 7, 2017 1:25 PM

    got this now that they white listed our server: The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2017-02-07T14:23:11). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay for xx@jcompany.com).
    )

    The may not have the account configured to allow relays on the SMTP server. But have them check the logs to see if they have the same (and not additional) errors.

    Sue

  • Working now thanks everyone! They had to set up relay service.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply