ColdFusion 9 adds SpoolMail (Kinda...)

This post is more than 2 years old.

One of the new features in ColdFusion 9 was inspired (I think so anyway) by my SpoolMail project. If you go to the mail settings in your ColdFusion 9 Administrator, you will see:

This brings you to a new page that allows you to browse email sitting in the undelivered folder. This is a great tool for checking emails sent out by ColdFusion on a development machine, which are normally not set to talk to a real mail server. Click the thumb for an example of the UI:

Screenshot

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by JC posted on 7/14/2009 at 6:28 PM

hmm... is there a function in CF9 to let you delay mail delivery? I've often wished I could leave mail in the spooler for an hour or two when I was sending out a bulk mailing to customers (I usually have our network guys blacklist the outgoing address so they capture it in our mail filters)... that way I can compare the number of mails that actually went out with the number I think should have gone out, and lets me wipe 'em out if I realize at the last minute that something was wrong with them.

Comment 2 by Raymond Camden posted on 7/14/2009 at 6:37 PM

As far as I know - no. You would have to write your own logic to do the mails in 'bunches' on an scheduled basis. It wouldn't be too terribly difficult though. You can store them in a 'queue' table, and your scheduled task could process N rows at a time.

Comment 3 by Steve Rittler posted on 7/14/2009 at 6:45 PM

what if you change the mail spooler check interval to some really high number (this may be possible through the AdminAPI - don't know off the top of my head), run your mail task and do your checks before that period expires?

similar fun could be had by setting the mail server name to something that makes no sense at all (mail.foofoo.bar), forcing all mail to the undelivr folder where you can do your review prior to moving the files to the spool directory so they get sent. i'm sure i could think of some other dumb server tricks to make this work...

Comment 4 by Phil Duba posted on 7/14/2009 at 7:16 PM

It looks like you can only delete or resend, but not edit then resend. Is that the case or does the "Resend" button allow for edits prior to respooling?

Comment 5 by Raymond Camden posted on 7/14/2009 at 7:18 PM

I believe you are right. SpoolMail FTW? ;)

Comment 6 by DanaK posted on 7/14/2009 at 7:25 PM

glad to see this feature in there. Spoolmail is always one of the first things we add to a new Coldfusion dev environment install.

Comment 7 by Adam posted on 1/20/2010 at 4:31 AM

Hopefully there is an adminapi method for re-spooling underlivered mail?!

Comment 8 by Jonathan posted on 3/8/2013 at 11:53 PM

what stinks about this is that the spooled message server information is in the message. my provider changed ports on me so all these spooled messages say 25, I changed my server settings so new mail is flowing but I have all these messages stuck in the queue and because they use the old port they go right back in there. This obviously wasn't thought out very well.