About Me

Thursday, January 13, 2011

Fun with HTML mail and word wrap

One would think that standard email is a pretty much solved problem these days. Some recent events showed me otherwise:

take Thunderbird and set it to HTML mail

receive a regular text mail

forward said email as HTML mail

receive that forwarded mail with Outlook

try to print it

What happens is this: Thunderbird sticks the original mail into a <pre> tag and when Outlook then receives it, it interprets it properly as HTML, except of course that it follows the spec a little to closely. <pre> tags don't word wrap in your browser and Outlook replicates that behavior exactly, thus if that original mail contained a few long lines, Outlook will display them as a single long line without word wrap, leading to a huge horizontal scroll bar when viewing and a plain cut-off of the text when trying to print it.