Hello All,
I am piping and storing email into mysql db 5.2.*. I separate the headers into different tables such as received, from, subject and body. The issue I face is how to format the body data on retrieval from the db.
Now, this is just for a back end tool I'm writing to help me chart trends based on email alerts I get from Nagios monitor so It doesn't have to reply to and forward these email so I just need basic formating so I can read the body in either plain text of HTML.
Here is an example of the data stored in the body table.
This is a multi-part message in MIME format.
------=_NextPart_000_0021_01C7FEF5.B1EBC610
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I love the winter. Ok, not really.
Thank you.
Bill Coker
eApps Customer Service
http://www.eapps.com
------=_NextPart_000_0021_01C7FEF5.B1EBC610
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.6000.16527" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
I love the winter. Ok, not = really.
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you.<BR>Bill Coker<BR>eApps =
Customer=20
Service<BR><A=20
href=3D"http://www.eapps.com">http://www.eapps.com</A></FONT></DIV></BODY=
</HTML>
------=_NextPart_000_0021_01C7FEF5.B1EBC610--
All I want to see on retreival from the db for this example would be;
I love the winter. Ok, not really.
Hope someone has some exp doing this and can point me in the right direction.
Thank you for your time.
Bill.