Email, Templates, and Perl

by Frank Wiles on May 31, 2007

I have been meaning to talk about one of my new favorite Perl modules, MIME::Lite::TT::HTML , for quite a while now. As I mentioned in a previous post, there are a bazillion different ways to send an Email message from Perl. This one is just my new favorite.

Here is a short list as to why:

Can be used for complex multi-part messages and handles attachments easily

Built upon the equally great MIME::Lite module

Allows you to easily template your messages using the familiar Template Toolkit package

The templating part is, in my opinion, the important part. How many times have you had to go edit some source code just to change the text or subject of a message? Isn't that just terribly annoying. We use configuration files, MVC with HTML templates, etc, etc. to not hard code things into our apps, but for some reason many people ( myself included for years ) have neglected Email.

Not any longer, I've switched to using this module as my standard way of sending Email these days. If you are interested in learning more about MIME::Lite::TT::HTML, check out my short howto Sending Email with Perl Best Practice on the subject.

Comments

Frank? I just read about your project and was surprised by you using past tense ... NewsCloud /was/ an application? Have you thrown in the towel?

--bentrem

*tweeeet!*

by Ben Tremblay on Jun 7, 2007 at 11:17 AM

Yeah I took NewsCloud down quite some time ago, it was a fun little experiment, but was mostly a favor for a friend of mine at the Washington Post so they had something to talk about when they opened up their feeds. So yes, I've "throw in the towel" on that project, but have many others in the works.

Not sure what you mean by "dusty site"...

by Frank Wiles on Jun 8, 2007 at 10:28 AM

Comments on this post are now closed. If you want to get in touch with us to discuss
this post please send us something on Twitter @revsys or use our contact form. Thanks!