Parse out the email body using perl
This is my perl code:
my $email = Email::Simple->new($brutEmail);
my $body = $email->body;
print $body;
And the result is
--0016364d2ceb8da59d048be66a88 Content-Type: text/plain; c开发者_JAVA技巧harset=ISO-8859-1 Mail content email contents email contentss
emails contentsss emmails contentsssss emmmail cccontent
--0016364d2ceb8da59d048be66a88--
Or
--0016364d2ceb8da59d048be66a88 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable eMail
content eMail content eMail content eMail content eMail content eMail content
--0016364d2ceb8da59d048be66a88--
I just want to retrieve the message body without the headers.
eMail content eMail content eMail content eMail content eMail content eMail content
Any Idea? without regexp..
Thx
I think Email::MIME
fits the bill. It's a more advanced version of Email::Simple
.
精彩评论