Skip to main content
Known Participant
June 2, 2011
Answered

Mail stuck in spool folder - coldfusion 9 enterprise

  • June 2, 2011
  • 1 reply
  • 6406 views

(I can't find any recent threads about this regarding CF 9.01)

We love all the new bells and whistles about coldfusion 9 mail delivery, but one bug is rather annoying.

Occasionally mail piles up in the spool folder. The only solution seems to be to reset CF. (I tried changing the spool interval to a lower value, and saving that temporarily, thinking it might force the spooler to kick in, to no avail).

However, when CF is reset, every single item in the spool is processed normally, within the spool interval time frame (we use 20 seconds).

Is there some way to tell CF to process the spool folder "on demand"? Resetting the CF service is an awfully big hammer to use to resolve this snafu.

Thanks in advance.

Byron

    This topic has been closed for replies.
    Correct answer Reed_Powell-ttnmOb

    We've seen that happen for years, even with CF8.  Not sure where I found the code below, but it

    will restart CF mail processing without restarting the entire CF service:

    <cfset sFactory = CreateObject("java","coldfusion.server.ServiceFactory")>
    <cfset MailSpoolService = sFactory.mailSpoolService>
    <cfset MailSpoolService.stop()>

    -reed

    1 reply

    Reed_Powell-ttnmObCorrect answer
    Inspiring
    June 3, 2011

    We've seen that happen for years, even with CF8.  Not sure where I found the code below, but it

    will restart CF mail processing without restarting the entire CF service:

    <cfset sFactory = CreateObject("java","coldfusion.server.ServiceFactory")>
    <cfset MailSpoolService = sFactory.mailSpoolService>
    <cfset MailSpoolService.stop()>

    -reed

    Known Participant
    June 4, 2011

    Thank you Reed, very much appreciated.

    Known Participant
    June 6, 2011

    UPDATE:

    Reed, your code was essential to fixing my problem, but has a typo. The word "stop" should be "start"

    Correct code is :

    <cfset sFactory =  CreateObject("java","coldfusion.server.ServiceFactory")>
    <cfset MailSpoolService = sFactory.mailSpoolService>
    <cfset MailSpoolService.start()>

    Irregardless, thanks for giving me the code, I was stranded otherwise, and it was an easy typo to figure out.

    :-)