Hi, I'm using Email::MIME to iterate through all parts of a multipart email, with the following code, which I have somewhat copied from the manual Email::MIME manual.
use Email::MIME; my $email; { local $/; $email = Email::MIME->new(<STDIN>); } $email->walk_parts(sub { my ($part) = @_; warn($part->content_type . ": " . $part->parts); }); This little snippet is supposed to read an email from stdin and print the content-types of all parts (plus the amount of subparts that it has). Now for most emails this works fine, but not so for attached email. For this email it only sees the first part: multipart/mixed; boundary="----=_Part_13986_26026450.1275360964578": 1 I would expect walk_parts to also iterate through the multipart/related, text/html and image/gif parts, but it does not. It may very well be that this email is malformed in some way, but this is the way I received it (I erased most of the actual content to make it shorter but the result is the same). Thunderbird has no problem parsing it, but perhaps Tbird is somewhat tolerant. Kind regards, Erik. P.S. I use the latest version of Email::MIME from CPAN and also the latest versions of the following dependencies: Email::Address Email::MessageID Email::MIME::ContentType Email::MIME::Creator Email::MIME::Encodings Email::MIME::Header Email::MIME::Modifier Email::Simple::Creator Perl itself and all other dependencies that may be are from Fedora 12 x86_64.
email3.eml
Description: application/mimearchive