Remove the header in multipart body?
"V.R.P. Prasad" <[email protected]> Mon, 6 Jun 2005 17:09:58 +0000 (UTC)
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Message-ID | <039a01c56be5$b83b3d20$9b01a8c0@vrpprasad> |
This is a multi-part message in MIME format.
------=_NextPart_000_0391_01C56BAB.05A869B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I am accessing multipart messages using=20
my @parts =3D $mail->parts('ALL');
foreach part(attachment) I am accessing using
$encodebody =3D $partmsg->body;
$decodebody =3D $part_encoded_body->decoded ;=20
=20
But sometimes Body of the parent mail will come as multipart so getting =
all the headers=20
NextPart_001_0761_01C56290.6D426E50 Content-Type: =
text/plain................etc in the $decodebody.Is there any method to =
remove these headers to get clean Body? Please provide your valuble =
suggestions if you can.
Thanks & Regards
V.R.P.Prasad.
=20
=20
------=_NextPart_000_0391_01C56BAB.05A869B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1498" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> I am accessing =
multipart messages=20
using </FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
=20
my @parts =3D $mail->parts('ALL');</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> foreach part(attachment) I =
am=20
accessing using</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> &nbs=
p;=20
$encodebody =3D $partmsg->body;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
$decodebody =3D $part_encoded_body->decoded ; =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>But sometimes Body of the parent =
mail will=20
come as multipart so getting all the headers </FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman"=20
size=3D3> =
NextPart_001_0761_01C56290.6D426E50=20
Content-Type: text/plain................etc in the <FONT =
face=3DArial size=3D2>=20
$decodebody.Is there any method to remove these headers to get clean =
Body?=20
Please provide your valuble suggestions if you =
can.</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks & Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>V.R.P.Prasad.</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> =20
</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0391_01C56BAB.05A869B0--