I've been dealing with this issue on and off for YEARS, dating back to CF 5 and 6.
Out of the blue, Coldfusion just stops delivering email, and the mail just keeps building up in the queue.
To restart the service I can restart coldfusion OR run the following code:
<cfset sFactory = CreateObject("java","coldfusion.server.ServiceFactory")>
<cfset MailSpoolService = sFactory.mailSpoolService>
<cfset MailSpoolService.start()>
The solution above is a fix noted on stackoverflow: https://stackoverflow.com/questions/94932/coldfusion-mail-queue-stops-processing
My goal would be to find a log or something that would help point me to the cause of the issue.
Is there a log that will tell me what is causing the mailspoolservice to crash? I can't seem to locate any errors in the CF Admin.
I have also tried to regenerate this issue, and I can't.
I'm currently running CF9 latest hotfixes applied, on windows 2008 r2
What version of ColdFusion are you running now and on what platform?
You can add some logging information via the ColdFusion administrator under the mail settings. See the documentation for mail logging on ColdFusion 9 here.
What is your mail logging set to now?
On one of our production servers (coldfusion 8 for backward compatibiliy reasons), we encounter this problem as well from time to time, although quite rarely, maybe once in half a year or so. I put this on a tiny scheduled task, running e.g. once an hour, to observe the mail spool folder for stucking and, in case it does, restarting the service (not cf server, but only the spool service):
Mail-Spool-Directory is from coldfusion 8 default dir: