Put "<div>" around hidden elements put out by the formtemplate tag when a customtemplate layout rather than a style template is used and that custom templatelayout doesn't put out the hidden elements manually.
Fix default mime type! text/plain for unknown extensions is a very badidea. Treating unknown files, many of the binary as text can only leadto suffering.
If we recieve mail in both plain text and html, use the plain text versionfrom the mail program rather than try to transform the html version into text.