in reply to Perl to open embedded email?

If you use an mbox style mailbox (most people do) you can parse it in all kinds of crazy ways (eg, pull all images, etc) with Mail::Box::Manager. Actually that may work with any kind of mailbox.

Here's a simple program to start you off:
#!/usr/bin/perl -w use strict; use Mail::Box::Manager; my $mgr = new Mail::Box::Manager; my $box = $mgr->open(folder=>"/you/mail/somebox"); my $c = 0; while (my $msg = $box->message($c)) { my @sender = $msg->from; my $id = $msg->messageId; print "\n$id\n$sender[0][0]\n"; $c++; }
That will print the message id number and sender for each message. To deal with attachments, you want to look into $msg->parts. Note that a "folder" here is actually a single file.