Problem with Database mail

  • Aspet Golestanian Namagerdi (3/4/2013)


    In sysmail_sentitems,there is not any record.

    In sysmail_unsentitems,In includes all the test emails I have tried

    In sysmail_event_log does not show that DatabaseMail process has been started to stopped at all.

    The last two event in this table are(I manullay stopped and started the mail Queue):

    The mail queue stopped by login...

    The mail queue started by login...

    Why don't you try seaching:

    SELECT *

    FROM msdb.dbo.sysmail_allitems

    Why haven't you tried opc.three queries?

    Whay are you trying to execute the DatabaseMail.exe?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • In sysmail_faileditems I didn't see any failure.I ran DatabaseMail.exe manullly,because I didn't see any

    "DatabaseMail process is started" & "DatabaseMail process is shutting down" events in msdb.dbo.sysmail_log table.Even when I e3xecute the DatabaseMail,nothing happened and also I didnt get any error message?

    Any thoughts?

  • Did you rule out anti-virus email blocking as I suggested? That's the only issue I've had with Database Mail in my environment (We're using McAfee AV).

  • I had the same issue about a month ago and after serveral head banging hours I contacted the mail server guys, the server was not set to send mail and the prot was blocked. Please run OPC's scripts as well! 🙂

    MCSE SQL Server 2012\2014\2016

  • Sometime's it's not the database 😉

  • do you have any server Database mail does work properly? if you do you may try and compare the configurations differences and if you could not find anything, you may have to reinstall the server(sql server)

  • ...sorry wrong post

    MCSE SQL Server 2012\2014\2016

  • Massan (3/25/2013)


    do you have any server Database mail does work properly? if you do you may try and compare the configurations differences and if you could not find anything, you may have to reinstall the server(sql server)

    I would avoid reinstalling SQL Server if at all possible.

    Can the OP get Database Mail working on any Server?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Did you find an answer to this problem? I have 2 instances of SQL Server running with what appears to be the exact same configuration and one sends mail and the other does not. All my tests in the problem instance show as "unsent". No failures, just "unsent".

    I've run all the sysmail sprocs and am thoroughly aware of all the information they provide. I've recreated the one mail profile. The accounts running the mail appear to have adequate priviledges. And, the mail runs from another instance with the same configuration? Have you found any clues?

  • rador (3/12/2014)


    Did you find an answer to this problem? I have 2 instances of SQL Server running with what appears to be the exact same configuration and one sends mail and the other does not. All my tests in the problem instance show as "unsent". No failures, just "unsent".

    I've run all the sysmail sprocs and am thoroughly aware of all the information they provide. I've recreated the one mail profile. The accounts running the mail appear to have adequate priviledges. And, the mail runs from another instance with the same configuration? Have you found any clues?

    Yes it had to do with the Service Account. Are you using a Domain or Local Account?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Corgi, Thanks for a quick response. How do I find the account being used to actually send the mail? In sysmail_allitems a request has been made by a local account (NT Authority\System) and last modified by 'sa'. The SQL Server Agent has windows authentication selected in the connecting tab. I don't have access to the server itself, but I can get someone that does and get them to check what accounts are being used in the services.

  • I am having the same issue of DB mail got stuck. I noticed if I turn the sql browser service to start, the db mail will send out the message. I don't think that DB mail requires sql browser service to be running.

  • I may have said this earlier and I'll say it again - if mail won't send and you know the settings are correct because they match a different server that does work, check local anti-virus settings and talk to the person in charge of the email server security settings.

    As you know, trojans taking over servers to send spam is a huge problem, and measures to prevent this may very well interfere with SQL Database mail.

  • I agree that security measures could be the cause. I could not get help from the local admin until I convinced them to let me try an experiment at the server. While there, I noticed a McAffe HIPS console with lots of funny red words that said attack. The admin said that had been going on for months but they couldn't do anything about it. I nearly fainted. I cajoled them to contact admins that were upstream to put an exception in place. It works fine now.

  • Classic left-hand/right hand situation.

    The left hand can't figure out why SQL Server Database Mail doesn't work, and the right hand can't figure out why an anti-virus program alarms like crazy because something on the server is trying to send mail.

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

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