Raymond Camden's Blog Rss

Yet another project - announcing SpoolMail

23

Posted in ColdFusion | Posted on 01-16-2006 | 5,997 views

So - here is a problem. You use <cfmail> to generate some mail on your dev box. Since you aren't hooked up to a "real" mail server, to check the mail you need to dig down to your undelivered folder. Wait for it to show up. Open the file, and then ignore all the mail header junk and see if the mail came out ok. This works - but is a pain. Especially now that I run multiple ColdFusion servers under JRun. Sure I could add a shortcut to my desktop, but then I'd have to minimize my desktop, and that's just too much work.

Enter SpoolMail.

What is SpoolMail? It is an extension that lets your ColdFusion Administrator read the mail in the undelivered folder in a HotMail/GMail type interface. You can even delete the mail or move it back to the spool. Even better - it has a luscious interface that just screams art! You want to look at this project. You need to. You want to hang it on your wall and rip up the Monet wasting space there now.

Enjoy. It is version 0 which means, basically, I wrote it real quick and didn't do a lot of QA on it. In theory, it could cause global warming. It could even make you cry, but most likely it won't cause anything worse than a hangnail. I'd mention my wishlist, but Lord knows I've only about ten thousand times on the blog.

Today's build was brought to you buy Freur, Sia, Cocteau Twins, Saint Etienne, and This Mortal Coil, AKA known as my "Depressing as Hell" playlist.

Comments

[Add Comment] [Subscribe to Comments]

Ray, that extension is a beautiful thing :)

and works great :))
You da man, Ray !

You just keep making my life easier and easier and easier...
very cool Ray.

Can I use this outside the CF Administrator? B/c our host doesn't allow us direct access to the Administrator. But we do have access to the mail directory paths and all the .cfmail files.
Very cool. I added it to the open-source project list.
nigga you is crazy!

nice idea though.

havent implemented yet, but the intro alone has now compelled moi!

adios
tw
have implemented right away, It works great thanks.
Hi Ray,

I think your code is really cool, we can check our bounce mails and your code exposed alot thing we can do very easily.

Thanks for your great code.

Thanks

Sana
You had me at <cfmail>.
i absolutely KNEW this post would garner responses like this, that was funny as hell phillip, thanks for the smile this marnin'

tw
Ohmigawd. w00t!
Brett, yes. Just put the files anywhere - although you may want to add password protection to it.
Can this be used on CF MX6.1?
Robo - yes. It should work just fine. Probably even in CF5.
Oops - I forgot that I used App.cfc. Phillip Duba sent me an app.cfm version. I'll proably switch to that later. Anyway - for those of you on 6.X, you will need to rewrite the app.cfc. But it shouldn't take long.
Hey Ray, can you explain the "or 1" thing below? I've never seen this shorthand.

isDefined("url.reinit") or 1
isnt 1 = yes = on = a positive thereby always boolean for yes, 1, on etc...

so basically its going to happen either way, whatever follows. so then, i ask, whats the point of checking for the existence?

its not a bitwise or operation, so i dont think its that.

must be like 1 or 1 really, since the isDefined("") returns 1 if its true.

right?
Brett, it is a mistake. :) It is my way of telling to app to reinit on every request. I do this when I'm developing something. In this case, I simply forgot to turn it off! I'll update the app tomorrow.
lol. that's pretty funny. you know I was thinking maybe it's just an override b/c he didn't feel like commenting out the cfif lines. but that was after I posted. heh, that's a good one.
Ray, can you explain this? why do you tell cf to ignore the runtime.abortexception?

<cfif structKeyExists(arguments.exception, "rootCause") and structKeyExists(arguments.exception.rootCause, "type") and arguments.exception.rootCause.type is "coldfusion.runtime.AbortException">
<cfreturn>
</cfif>

Thanks.
There is a bug where cflocation (or cfabort, I always forget) will fire onError. That code is there to make it ignore it.

FYI - I'll be updating the zip today to use APp.cfm. Someone sent me the conversion already so it won't take long. This will let the app work with CF6. (And CF5 I'm sure.)
Ray, you are the man. This is so simple and beautiful. Thanks a bunch.
Just checked it out; looks awesome!

The one thing I have besides this for managing the spool is a text-mode file manager with built-in fast viewer (Far) - but this is loads easier.

One huge addition would be to extract the relevant line(s) from mail.log (and mailsent.log for 6/7) for that spool filename to get the exact error. Would be version-specific, and requires searching through 1-2 potentially big logfiles that may be locked, so may be more trouble than it's worth, unless it's possible to read those without locking.
Please does anyone know how to configure cfmail to send delivery notification to an email address? i'm trying to monitor the emails i send out such that a response should be sent to my address when the email is delivered, i should get a notification.
Thanks.

[Add Comment] [Subscribe to Comments]