I'm wondering what's the best way or what's the best module to parse an email and get the decoded data in pure perl strings.
For instance, I'd love to parse something like that:
+ + + Received: by 10.115.106.19 with HTTP; Thu, 24 Jan 2008 09:10:50 -0800 +(PST) Message-ID: <f516fcd80801240910j797b0e09h26cbafede672403f@mail.gmail.c +om> Date: Thu, 24 Jan 2008 17:10:50 +0000 From: "=?UTF-8?Q?J=C3=A9r=C3=B4me_Et=C3=A9v=C3=A9?=" <jerome@eteve.net +> Sender: jerome.eteve@gmail.com To: "Jerome Eteve" <jerome@careerjet.com> Subject: =?UTF-8?B?2LbYsdix2Ykg2LfZiNmC2YjZhtmF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Content-Disposition: inline Delivered-To: jerome.eteve@gmail.com X-Google-Sender-Auth: b14660e8948ad477 2LbYsdix2Ykg2LfZiNmC2YjZhtmFamlkamkgagoKZGppd29qZCB3b3dvd29vd293CgotLS +AKSmVy b21lIEV0ZXZlLgoKU3BlYWsgdG8gbWUgbGl2ZSBhdCBodHRwOi8vd3d3LmV0ZXZlLm5ldA +oKamVy b21lQGV0ZXZlLm5ldAo=
And then be able to do:
my $mail = MagicMailModule->parse($data) ; my $to = $mail->To() ; my $from = $mail->From() ; my $body = $mail->Body() ;
Do you have an idea of what I could use ?
Thanks for any help !!
-- Nice photos of naked perl sources here !
In reply to Parsing email by jeteve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |