Hi guys,
Is there any function in PHP that would automatically format an email?
I emails like the one pasted at the end of this message, and would like to hide the header info automatically, an only print out the text/plain part, but since each boundary code is different it seems to get very messy very quickly, just wondeirng if PHP had a built in solution?
Heres an example of the email:
Return-path: <test@test.com>
Envelope-to: test@test.com
Delivery-date: Thu, 14 Dec 2006 17:33:29 -0600
Received: from testserver by test.noc.com with local-bsmtp (Exim 4.52)
id 1Gv04p-0001gq-1s
for test@test.com; Thu, 14 Dec 2006 17:33:28 -0600
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on test.noc.com
X-Spam-Level:
X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_40,FORGED_
RCVD_HELO,
HTML_90_100,HTML_MESSAGE autolearn=ham version=3.1.7
Received: from [199.282.72.658] (helo=smtp1.freeserve.com)
by test.noc.com with esmtp (Exim 4.52)
id 1Gv04o-0001gS-MR
for test@test.com; Thu, 14 Dec 2006 17:33:22 -0600
Received: from me-test.net (localhost [127.0.0.1])
by test.me.test.com (SMTP Server) with ESMTP id 069531C00081
for <test@test.com>; Fri, 15 Dec 2006 00:33:21 +0100 (CET)
Received: from p600 (user-test.lns1-c12.test.t
est.co.uk [111.111.111.111])
by mwinf3011.me.test.com (SMTP Server) with ESMTP id CE9991C00086
for <test@test.com>; Fri, 15 Dec 2006 00:33:20 +0100 (CET)
X-ME-UUID: 20061214233320846.CE9991C0
0086@mwinf
3011.me.fr
eeserve.co
m
Message-ID: <001801c71fd8$41e32270$650
2a8c0@p600
>
From: "test" <test@test.com>
To: <tester@test.com>
Subject: Hi
Date: Thu, 14 Dec 2006 23:33:26 -0000
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_0
00_0015_01
C71FD8.411
80A40"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
Disposition-Notification-T
o: "Test" <test@test.com>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
This is a multi-part message in MIME format.
------=_NextPart_000_0015_
01C71FD8.4
1180A40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding:
quoted-printable
Hi,
thanks for that information,
Will
------=_NextPart_000_0015_
01C71FD8.4
1180A40
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.2900.2995" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>thanks for that =
information,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DI
V>
<DIV><FONT face=3DArial size=3D2>Will</FONT></DIV>
</BODY></H
TML>
------=_NextPart_000_0015_
01C71FD8.4
1180A40--