Perl Monk, Perl Meditation | |
PerlMonks |
Re: Saving attachments from email filesby dave0 (Friar) |
on May 02, 2005 at 17:26 UTC ( [id://453334]=note: print w/replies, xml ) | Need Help?? |
You're part-way there with MIME::Parser, but you're not actually using the return value of ->parse() for some reason. Try something like this as a starting point:
MIME::Parser::parse() will return a top-level MIME::Entity object for the message. If it's a multipart message, you can get the separate MIME::Entity objects for each subpart by iterating over $entity->parts(). Then in that foreach loop, you can examine the content-type or filename of each part and determine what you want to do with it.
In Section
Seekers of Perl Wisdom
|
|