问题
We are currently experiencing intermittent mail queue stoppages. I'm seeking diagnostic help in another area.
In the meantime, is there a way to restart the CF mail queue without restarting the service as a whole?
CF8 standard Win2k3
Solution: We are now checking the age of the oldest file in the mail queue. When it exceeds a set age (currently 30 min) the mail queue is restarted.
回答1:
Yes there is.
<cfset sFactory = CreateObject("java","coldfusion.server.ServiceFactory")>
<cfset MailSpoolService = sFactory.mailSpoolService>
<cfset MailSpoolService.stop()>
<cfset MailSpoolService.start()>
来源:https://stackoverflow.com/questions/94948/restarting-coldfusion-mail-queue