How to parse email content

How to analyze email for sections such as header, body, attachment, sender and recipient? Would I like to use Perl or Perl Moose?

+4
source share
1 answer

see Mail :: Message - a common message object something like

my $msg =Mail::Message->new($mail); my $body = $msg->body; my @to = $msg->to; my @from = $msg->from; 

or see Email :: Simple - a simple analysis of the format and headers of RFC2822 messages.

Updated:

see also Email :: MIME - Simple MIME message processing.

+8
source

Source: https://habr.com/ru/post/1347029/


All Articles