Hello all,
I'm a newbie in PERL and definitely want to learn. I'm playing around with the module Mail::POP3Client, trying to strip mails. One problem i had is that the body of the email contains Tags. Because i needed only the text content i strip away those tags using HTML::TreeBuilder and it left me with this ;
------=_NextPart_000_007F_01C180F0.5D9AD8A0 Content-Type: text/plain;
+charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
i wonder how can we know that its the email's body
------=_NextPart_000_007F_01C180F0.5D9AD8A0 Content-Type: text/html; c
+harset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
للل i wonder how can we = know that=20 its the email's body
------=_NextPart_000_007F_01C180F0.5D9AD8A0--
Is there a way to clean away these unnecessary strings and just leave the email text body.
By the way the body should only be "i wonder how can we know that its the email's body"
Any help will be greatly appreciated. thanks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.