Database Mail Problems

  • Hello,

    I am having an issue where I am trying to send a database Mail, the command returns the message:

    "Mail Queued"

    But no email is received. Looking into I have found:

    There are no errors in the database LOG.

    The state from sysmail_help_queue_sp @queue_type = 'Mail'; is

    RECEIVES_OCCURRING

    The service Broker is enabled.

    The user has full permissions to the msdb database.

    The Server name that database mail is configured to is valid. It is used in a number of Database Mail setups across our network without issue.

    There are no errors in the event viewer.

    Any ideas ?

  • What is the result when you send test E-mail

    Check if you have set agent properties->alert system->

    mail system as database mail

    mail profile the profile u have created for database mail.

    Tanx 😀

  • Eswin (5/18/2009)


    What is the result when you send test E-mail . I recieve the test email correctly

    Check if you have set agent properties->alert system->

    mail system as database mail

    mail profile the profile u have created for database mail.

    I have done this (another one to add to the list). Thanks for your prompt reply, any other ideas?

  • Hello,

    It might be worthwhile running through the Steps in the following Troubleshooting Guide (if you haven’t already):-

    http://www.sqlhacks.com/index.php/Administration/Database-Mail-Troubleshooting

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

  • Went through the list and found that I have there is current emails in the queues, that are deemed INACTIVE. Not sure where to go now though.

  • Are you trying to send a Service Broker email or just an email to some end users with DBMail? It makes a difference on what you troubleshoot.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • An email to some end users with DBMail

  • Have you checked the mail server name? If the SMTP mail server isn't working, then SQL Server would queue the emails and not realize anything is wrong.

    Also, it could be a Ports issue.

    Get your messaging team and network people involved to help you trace the path of the email. Run the sp_send_dbmail proc from SSMS if you haven't already done so and put yourself in as the recipient. And have you gone through BOL to verify you have EVERYTHING on DBMail set up properly? Sometimes it only takes one missed setting to create a SNAFU.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Hello again,

    Did you ever get to the bottom of your issue?

    If so, could you post the resolution?

    If not, in which of the msdb items views did your test mails finally end up in e.g. msdb.dbo.sysmail_faileditems or msdb.dbo.sysmail_sentitems?

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

  • Wat is the message u get from database log...some times the antivirus used in ur system will be blocking the mails

  • John Marsh (5/20/2009)


    Hello again,

    Did you ever get to the bottom of your issue?

    If so, could you post the resolution?

    If not, in which of the msdb items views did your test mails finally end up in e.g. msdb.dbo.sysmail_faileditems or msdb.dbo.sysmail_sentitems?

    Still an issue they end up in the msdb.dbo.sysmail_sentitems

  • jabba (5/20/2009)


    Still an issue they end up in the msdb.dbo.sysmail_sentitems

    That tells me the issue is with the mail server, not SQL.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • We use a Groupwise agent to control relaying. All servers that want to sent SMTP mail must have their IP address registered int he GroupWise Internet Agent configuration, under access control you will find the relaying option and can add the sending servers IP address. If you use Exchange server their may be a simlar function. To verify go to the SQL server in question open a Commmand windo and type in TELNET "smtp server name or ip" 25 If this produces an error you must check the SMTP agent or the Exchange server to see whats wrong. If this works then DBMAIL should work as well. At least if the TELNET produces an error it will be easier to speak to the person in change of mail relaying as they will understand this error better than saying SQL mail isn't working.

    Francis

  • I agree with SSC Rookie. I just got this working yesterday and I had to add an exception for DatabaseMail90.exe in my McAfee AV to allow email to work.

    Also, check that you have a default profile set in Database Mail > Config Wiz > Manage profile security.

    Hope this helps.

  • Hello again,

    I agree with Brandie Tarvin – the problem is outside of SQL Server. Are you responsible for the Mail Server? If not then ask the Administrator to check the logs for relevant entries around the time that you send a test mail. Also worth checking the Event Logs on both the SQL and Mail Servers for those times. Hopefully you will spot a useful error message.

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

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

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