I'm using a pop3 module for my helpdesk script and emails are fetched in the following format:
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C19779.AD7C3540
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printableThis is just a test.
------=_NextPart_000_000B_01C19779.AD7C3540
Content-Type: text/html; charset="Windows-1252"
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=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR>
<STYLE>
</STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<FONT face=3DArial size=3D2>
This is just a =test.
</FONT>
</DIV>
</BODY>
</HTML>
------=_NextPart_000_000B_01C19779.AD7C3540--
Is this the standard format or is it just because Im viewing it through my browser?
I wasn't expecting html code.
Im parsing it with the following:
$body =~ s,^.*<FONT[^>]+>(.*?)</FONT>.*$,$1,si;
Is there something more reliable I can use?
Thanks.
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C19779.AD7C3540
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printableThis is just a test.
------=_NextPart_000_000B_01C19779.AD7C3540
Content-Type: text/html; charset="Windows-1252"
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=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR>
<STYLE>
</STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<FONT face=3DArial size=3D2>
This is just a =test.
</FONT>
</DIV>
</BODY>
</HTML>
------=_NextPart_000_000B_01C19779.AD7C3540--
Is this the standard format or is it just because Im viewing it through my browser?
I wasn't expecting html code.
Im parsing it with the following:
$body =~ s,^.*<FONT[^>]+>(.*?)</FONT>.*$,$1,si;
Is there something more reliable I can use?
Thanks.