views:

62

answers:

1

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; charset=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

+4  A: 

I think Email::MIME fits the bill. It's a more advanced version of Email::Simple.

rmk