I fixed a small problem in my no-multipart-alternative.pl script
today. If I received a mail message containing multiple text/plain
parts, where some of the text/plain parts had filenames, then the
script would erroneously collapse all the text/plain parts into a
single text/plain part. This meant that a text/plain mail with a
text/plain attachment would essentially lose the attachment.
I adjusted the script to collapse multiple text/plain parts only when
none of them has a filename specified.
Multiple text/plain parts can occur when a multipart/alternative
text/{plain,html} message is sent to a mailing list and the mailing
list software appends a text/plain signature part, giving you a
message structure like this:
multipart/mixed
multipart/alternative
text/plain
text/html
text/plain
As long as the text/plain parts don't have associated filenames
(indicating that they are not intended to be separate attachments), my
script will collapse this to a single text/plain Content-Type,
stripping away the text/html alternative and then collapsing all the
text/plain parts into a single text/plain message body.
Attached (as a text/plain attachment!) is the updated script.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>
Legalize Adulthood! <http://legalizeadulthood.wordpress.com>