- or download this
my $p= MIME::Parser->new;
$p->output_to_core(1);
$p->parse($msg_or_fh);
- or download this
# Find every MIME part which is not a container for other parts
sub _leaf_parts {
...
@parts? ( map { _leaf_parts() } @parts ) : ( $_ )
}
my @leaf_parts= map { _leaf_parts() } $email;
- or download this
# Open a handle to each part which is an attachment
my @attachments=
...
# Convert zipfile attachments to the list of files within
@attachments= map { $_->{name} =~ /\.zip$/? _extract_zipfile($_) :
+($_) } @attachments;
- or download this
# Takes one file info, and returns a list of file infos for each file
+within the zip file.
# Since these are not directly MIME parts, they are simply:
...
if $status < 0;
return @files;
}