Mail::Message::Attachment::Stripper - Strip the attachments from a mail
my $stripper = Mail::Message::Attachment::Stripper->new($mail); my Mail::Message $msg = $stripper->message; my @attachments = $stripper->attachments;
Given a Mail::Message object, detach all attachments from the message. These are then available separately.
my $stripper = Mail::Message::Attachment::Stripper->new($mail);
This should be instantiated with a Mail::Message object.
my Mail::Message $msg = $stripper->message;
This returns the message with all the attachments detached. This will alter both the body and the header of the message.
my @attachments = $stripper->attachments;
This returns a list of all the attachments we found in the message, as a hash of { filename, content_type, payload }.
To install Mail::Message::Attachment::Stripper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Message::Attachment::Stripper
CPAN shell
perl -MCPAN -e shell install Mail::Message::Attachment::Stripper
For more information on module installation, please visit the detailed CPAN module installation guide.