开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜