How to parse the Email into sections like, header, body, attachment, and sender and receiver? I would like to use Perl or Perl Moose?
Email parsing is the process of using software to look for and extract specific data in an email to avoid manual data entry. Things like order numbers, leads, contact details and more can be found in emails. The challenge with email parsing is that emails are designed for humans, not for machines.
see Mail::Message - general 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 - simple parsing of RFC2822 message format and headers.
Updated:
see also Email::MIME - Easy MIME message parsing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With