Post by Ansgar Wiechers Post by Jeroen Geilman Post by Alex
Is it possible to strip the entire HTML content and pass only the
text? Perhaps the right way to say it would be to pass only the MIME
text and strip everything else?
I found this fantastic little util called "mailtextbody" - it does
just that: strips off all non-text parts and leaves a clean,
Sounds interesting, but how does it handle html-only mails (i.e. mails
with no text/plain MIME part) or mails that are declared text/plain, but
contain HTML nonetheless?
Good point ;)
Mail that does not contain a text-only representation of the content may
safely be dropped, since it violates the RFCs.
Malformed messages (yes, I'm looking at you M$ Outhouse) are anotehr
matter, and will almost always cause problems - anywhere.
I'm not saying "use this, it's foolproof".
I am saying I found it, it does what it advertises, it's simple, and a
lot less hassle to configure and maintain than the various MIME* solutions.
One possible application (one we use it for, incidentally) would be to
strip out the mailtextbody and send it over a smaller medium, such as
SMS or Twitter, and keep the original mail separately.