halfcountplus has asked for the wisdom of the Perl Monks concerning the following question:
$jpg can be written straight to a .jpg file.use Mail::Box::Manager; use MIME::Base64::Perl; [...] my $msg = $folder->message(0); if ($msg->isMultipart) { my @parts = $msg->parts; foreach (@parts) { if ($_->contentType eq "image/jpeg") { (my $body = $_->body) =~ s/\n//g; my $jpg = decode_base64($body); } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: grabbing jpg from mbox
by zwon (Abbot) on Jul 30, 2009 at 18:58 UTC | |
by halfcountplus (Hermit) on Jul 30, 2009 at 19:14 UTC |