Database Mail not working

  • Hi all,

    I have just did a new/clean installation of the SQL Server 2016 (standard edition) on a Windows 2012 R2 VM-Server. Just installed standard features as server agent, db engine and so on.

    All works fine so I have configured the database mail (as previously done on other versions of SQL Server). When I send a test-mail, nothing happens. The mail gets added to the queue but keeps staying in status "unsent".

    I searched everywhere for a possible solution, checked the status of service broker and all that kind of stuff with no luck. I do also have no errors in the database mail log.

    Already sent test-mail with telnet on the host which works fine, so no firewall issue as well.

    Does anybody has a clue what the problem could be or what I am missing?

    Thanks for any advice in advance.

  • Try checking the description in sysmail_event_log. If you query that, many times it will report if you have some type of SMTP errors or configuration issues. You could join it back to failed items if needed - something like:

    SELECT fi.subject,

    fi.last_mod_date,

    el.description

    FROM dbo.sysmail_faileditems as fi

    INNER JOIN dbo.sysmail_event_log AS el

    ON fi.mailitem_id = el.mailitem_id

    Sue

  • The error in the mail log should point you in the right direction.

  • Perhaps database mail is lacking TLS 1.2 support: https://support.microsoft.com/en-us/kb/3135244

  • Thanks for your feedback. When I run the script you provided, I only get an empty result set. That is also the issue with the DatabaseMail-Log. No log entries showing any kind of error. All mails I have sent are in the queue but with a status of "unsent".

    As already mentioned, I have tried sending a test mail with telnet from this server which works. So there shouldn't be an issue with the Firewall or similar...

    I am really stuck here and have no clue what else I could try... any other idea what I could check?

    Thanks a lot in advance.

    Best regards,

    Claudio

  • donstarter (9/5/2016)


    Thanks for your feedback. When I run the script you provided, I only get an empty result set. That is also the issue with the DatabaseMail-Log. No log entries showing any kind of error. All mails I have sent are in the queue but with a status of "unsent".

    As already mentioned, I have tried sending a test mail with telnet from this server which works. So there shouldn't be an issue with the Firewall or similar...

    I am really stuck here and have no clue what else I could try... any other idea what I could check?

    Thanks a lot in advance.

    Best regards,

    Claudio

    Claudio this is a known issue in 2016 - check this link out https://joeydantoni.com/2016/07/27/sql-server-2016-database-mail-not-working/

  • Hi bugg,

    Thanks for the link. I have already found that topic and tried it myself. Unfortunately without luck. I have restarted SQL services and even the whole server after I did this copy-item command but without any change.

    Did that work for anybody? Do I miss something here?

    Thanks

  • Yes it worked for me, are you also on CU1?

  • That was the problem. I have installed CU1 and copied the file again. Works like a charm.

    Thanks for your help!

  • donstarter (9/5/2016)


    That was the problem. I have installed CU1 and copied the file again. Works like a charm.

    Thanks for your help!

    No problem, glad to have helped

Viewing 10 posts - 1 through 9 (of 9 total)

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