March 23, 2012 at 8:46 am
Please post to the following:
http://www.sqlservercentral.com/Forums/Topic1276632-1550-4.aspx#bm1276973
I execute the following statement to check the status of Database Mail:
EXEC msdb.dbo.sysmail_help_queue_sp @queue_type = 'mail';
The mail queue should have the state of RECEIVES_OCCURRING
So I tried stopping the queue using sysmail_stop_sp and then starting the queue using sysmail_start_sp but it does not change the State.
Does anyone know what could be causing this problem and what I can do to resolve this issue?
Any help would be greatly appreciated.
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/
March 23, 2012 at 8:59 am
I believe you are incorrect; the default state would be INACTIVE unless you query the queue at teh exact moment you are actually sending an email.
all four of my servers i just checked all show INACTIVE, nad one ran an email campaign this morning at 7am wiithout errors.
Lowell
March 23, 2012 at 9:18 am
Lowell (3/23/2012)
I believe you are incorrect; the default state would be INACTIVE unless you query the queue at teh exact moment you are actually sending an email.all four of my servers i just checked all show INACTIVE, nad one ran an email campaign this morning at 7am wiithout errors.
Thanks for correcting me.
I sent mail and checked it and the status and it was still INACTIVE.
The problem is that all of the items are in the queue and none have been sent.
I tested SMTP Mail with Telnet and it worked.
Any suggestions?
Thanks again.
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/
March 23, 2012 at 9:48 am
i found some interesting stuff about service queues not having a unique GUID over here:
I know i've had a situation a couple of times where the service just doesn't seem to send mail, and the procs for starting and stiopping the mail service were ineffective; the only solution was to stop and start the SQL service, which fixed the issue immediately.
I've never had the service in that situation where it was stuck, AND i could write any diagnostics to detect what the core issue was; I've had to bounce the serice immediately for biz reasons.
Lowell
March 23, 2012 at 9:54 am
I had already tried restarting the SQL Server Service but no luck.
I used the same script to configure Database mail that I used on another new Server a month ago and I did not have any problems.
I'm feeling like what's wrong that I can't figure this out.:blush:
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/
May 20, 2014 at 12:12 pm
I ran into a similar problem with mail not being sent even though everything is configured correctly. The problem turned out to be the name of my mail profile! I had a space in it. So when I changed "Mail Profile" to "MailProfile", everything worked fine and the mail queue state correctly changed from "INACTIVE" to "RECEIVES_OCCURRING".
February 20, 2015 at 2:48 pm
Just to say restarting sql server services also solved this problem for me.
C# Gnu
____________________________________________________
February 18, 2016 at 12:06 pm
I know this is an old post, but I wanted to add this since lately we have been dealing with few failures of SQL Mail not sending email.
1) If EXECUTE dbo.sysmail_start_sp does not work, then go to task manager and stop/start the databasemail process. The process name is DatabaseMail.exe. Once you started the process, send test mail using the profile(s) you have to clear the unsent mail queue.
April 14, 2017 at 11:38 am
I realize this is an old post, but the issue for me was the .net 3.5 framework was not installed (Win2K12R2/SQL2016 - new installation) and as such the databasemail.exe was unable to run.
June 15, 2017 at 9:34 am
@eggerts2k It may have been an old post but THANKS for the note regarding the .Net 3.5 installation. I spend 4 hrs trying to figure out why I was having this problem after enabling mail on a 2012 server I inherited. I saw your note and checked the installed features. Net4.0 was installed but 3.5 was not. 5 minutes later 3.5 was installed and the problem was resolved.
September 18, 2017 at 8:22 am
@eggerts2k Seconding this!
Quick install of .net 3.5 and my problem was solved.
Clayton
August 22, 2019 at 1:34 pm
I know this this is an old thread, but thought this may be worth a mention.
I have the same issue on a SQL2016 / Windows Server 2012R2 box.
I'd tried everything (up to and including deleting and rebuilding the mail profile!).
I finally got round to checking Task Manager (thanks to Isalih for this one) and noticed that I'd got 2 instances of DatabaseMail.exe running.
I killed them both, stopped and restarted mail in SSMS (using EXEC dbo.sysmail_stop_sp and EXEC dbo.sysmail_start_sp) and all is now good.
Hope this helps someone.
November 2, 2019 at 1:55 am
Thank you very much for this thread, which gave me sufficient hints to discover yet another solution (as I wasn't able to install .NET 3.5 framework):
Their workaround #1 (simply recreating the missing DatabaseMail.exec.config file) worked like a charm for me. See instructions in the link above.
PS: There's nothing like discovering a sql agent job has been silently failing because the failure notification email wasn't getting sent...
February 12, 2020 at 2:29 pm
"SSCrazy Eights" solution worked for us. in jan 2020 and feb 2020 our database mail was in a hung state and not automatically sending mail. We rebooted after patching and fixed us temporary in jan 2020. We have been manually clicking the databasemail.exe to get our mail daily. so we kept researching and found SSCrazy Eights solution. Thanks, this worked for us.
“I finally got round to checking Task Manager (thanks to Isalih for this one) and noticed that I'd got 2 instances of DatabaseMail.exe running.
I killed them both, stopped and restarted mail in SSMS (using EXEC dbo.sysmail_stop_sp and EXEC dbo.sysmail_start_sp) and all is now good.”
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply