How do I troubleshoot Database Mail?

  • Hello,

    I setup new profile and mail fails to send and all I get in a log failure is information below which is utterly useless. How do I get more information what actually fails? I did verify that server itself can propery send mail via Outlook so it's not issue with connectivity or credentials

    Date12/31/2014 5:31:54 PM

    LogDatabase Mail (Database Mail Log)

    Log ID228

    Process ID200020

    Mail Item ID114

    Last Modified12/31/2014 5:31:54 PM

    Last Modified Bysa

    Message

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2014-12-31T17:31:54). Exception Message: Cannot send mails to mail server. (Failure sending mail.).

    )

  • This was removed by the editor as SPAM

  • Hello,

    Please see attachments.

  • This was removed by the editor as SPAM

  • Telnet to mailserver/port is working ? Firewall is open ?

  • Joy Smith San (1/1/2015)


    Telnet to mailserver/port is working ? Firewall is open ?

    Yes, everything is working. I installed Windows Mail on the server and configured with the same settings as SMTP on the box and it can successfully send email, so it's not networking or credentials which is causing issues. Something within DB Mail causing it.

  • OK.. Any attachment in the mail ? Recently I was facing some issues with attachment.

  • Joy Smith San (1/4/2015)


    OK.. Any attachment in the mail ? Recently I was facing some issues with attachment.

    No, nothing fancy. Just word "test" in subject and body. Relaying by they way through localhost works fine, so engine itself is fine.

  • Check with the SMTP servers administrator. I noticed that your FROM address is not the same domain name as the SMTP server that you show. As SPAM prevention some servers will not except FROM names that are not in the same domain.

    ATBCharles Kincaid

  • Charles Kincaid (1/5/2015)


    Check with the SMTP servers administrator. I noticed that your FROM address is not the same domain name as the SMTP server that you show. As SPAM prevention some servers will not except FROM names that are not in the same domain.

    Tried different ones and nothing seems to work. Also if there would be any issues like that then log shall be containing errors and SMTP error codes etc and not some obscure reference that mail just can not be sent with no details I assume.

  • Are there any msgs in the Agent Error Log?

    Watch my free SQL Server Tutorials at:
    http://MidnightDBA.com
    Blog Author of:
    DBA Rant – http://www.MidnightDBA.com/DBARant

    Minion Maintenance is FREE:

  • No, Agent error log is clean of any errors. The only one there about Messenger service which is not started which has nothing to do with SMTP.

  • Are the mail XPs installed and the acct has perms to run them?

    Watch my free SQL Server Tutorials at:
    http://MidnightDBA.com
    Blog Author of:
    DBA Rant – http://www.MidnightDBA.com/DBARant

    Minion Maintenance is FREE:

  • KenpoDBA (1/5/2015)


    Are the mail XPs installed and the acct has perms to run them?

    Yes everything is installeed. Again relaying through localhost works, just relaying through remote system does not.

  • Quite often in companies, they deny servers the ability of servers to use exchange as a relay server. You have to ask your email admin to add your sql box to the relay list.

    If everything else checks out this is my best guess.

    It's been a while since I've had to request it, but I believe the wording would be something like:

    Could you add my sql box (server1) to the list to be able to use exchange as a mail relay?

    Even internally in my lab here it took me 2 days to remember that and once I did, I added it to the list and was able to send mail immediately.

    Watch my free SQL Server Tutorials at:
    http://MidnightDBA.com
    Blog Author of:
    DBA Rant – http://www.MidnightDBA.com/DBARant

    Minion Maintenance is FREE:

Viewing 15 posts - 1 through 15 (of 16 total)

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