http://www.perlmonks.org?node_id=194574

RuneK has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I'm writing a script to decode a mail so that I ONLY get the:

to from cc subject body

I'm using the MIME::Parser to decode the mail, but I run into some very anoying mail format problems.

When I send a mail from hotmail the body contains a lot of HTML that I do not need in the pure format. The from field sometimes contain an alias in this way:

"Usern name" test@test.dk

where I only want the pure mail address.

So my question is. What is the trick to ONLY the the pure information from a mail where the mails format can wary a lot in the header and body section?

Best regards, RuneK