Programmatically Reading ColdFusion's Mail "Spool Interval" Setting

Posted by Dan on Sep 6, 2005 @ 3:44 PM

I was working on some code today and needed to determine what the value of the "Spool Interval" was in the CF Administrator. After playing around for a few minutes, this is what I came up with. This code uses non-documented functionality, but I've tested the code under CFMX 6.1 and CFMX 7 and it seems to work fine. Obviously, if Macromedia changes internal workings of ColdFusion, this code may break in the future.

<!---// create a reference to the CF ServiceFactory //--->

<!---// get the mail spool service //--->
<cfset oMailSpool = oFactory.getMailSpoolService()>
<!---// get the mail spool interval schedule in seconds //--->
<cfset iSpoolInterval = (oMailSpool.getSchedule() / 1000)>
Categories: Source Code, HTML/ColdFusion


  • With MX7 to keep things safe you can do (assuming code appears properly):

  • Sigh ... gets stripped out.

    adminObj =


    myObj = createObject("component","cfide.adminapi.mail")

    spoolInterval = myObj.getMailProperty("spoolInterval")

    You get the picture :)
  • Good tip--plus that's Macromedia's "Official" method of getting CF Administrator settings. Alan's code is what is technically support by MACR.

    Unfortunately, I needed to do this on CFMX 6.1 and there is no "open" API.

Add Comment

Leave this field empty