[rt-users] REG: HTML mails
Eric Goodman
ericg at cats.ucsc.edu
Mon May 7 18:37:35 EDT 2001
> > A plaintext message body (named
>> "message") comes with a type/subtype of "text/text" (I think).
>
>text/plain
That's what happens when I get lazy and try to respond from memory!
> > The case you describe is HTML only. For this I think you typically
>> see a message body with name "message, part 1" (though I would expect
>> you might see just "message") and type/subtype "text/html".
>
>The body's name is MTA-dependent. A safer way to check for this would be
>to look for messages which have a text/html part, but no text/plain part.
>(You wouldn't want to look for text/html as the only part because it
>could have attachments, but still lack a plaintext version of the body.)
Good to know! Still, it works for most of the mailers we're using,
and stripmime itself looks for a part named "message" in determining
what to use as the message body, so I think my additions will work in
most cases where stripmime would have worked for a corresponding
plain-text or mixed-type messages.
That's not a great excuse for not implementing a better search, but
then again, that's why I hadn't sent my code to the list earlier. :)
--- Eric
More information about the rt-users
mailing list