On 05/20/2010 09:31 AM, Ansgar Wiechers wrote:
On 2010-05-20 Jeroen Geilman wrote:
On 05/19/2010 10:30 PM, Alex wrote:
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,
text-only message.
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?

Regards
Ansgar Wiechers
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.

YMMV

Gr.,

J.

Reply via email to