« Mexico Cruise, part 2 | Main | Star Trek, The Dynamic Society »

Email Colorizer

A friend sent me an email that I wanted to quote on my blog. I could save the email text to my server, but it would certainly not look appealing on a web browser. So, I wrote a little Perl script that takes email text, and formats it with HTML. Perhaps other with a similar problem will find it useful.

The Perl script reads and writes to the console, so the typical way of using it would probably be something like:

colorizemail.pl < msg.txt > msg.html

The resulting HTML file will have the email headers (i.e. to, from, server info, etc) in a greenish box at the top, and the main text will be in a sans-serif font. (I'm a big fan of Arial.) The script contains a CSS style-sheet description at the top, so one can customize the output for specialized needs.

An example of the use of this can be found here and the code itself can be downloaded from here.

Enjoy! If you have any questions or comments, please post them here.

Ads

TrackBack

TrackBack URL for this entry:
http://www.borlik.net/cgi-bin/blog/mt-tb.cgi/52

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)