I use the htmlMimeMail library from phpguru.org. http://www.phpguru.org/sta
There's also a library in the PEAR that does this stuff. See http://devzone.zend.com/no
Main Topics
Browse All TopicsHi 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_
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
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
Message-ID: <001801c71fd8$41e32270$650
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
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
Disposition-Notification-T
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
This is a multi-part message in MIME format.
------=_NextPart_000_0015_
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding:
Hi,
thanks for that information,
Will
------=_NextPart_000_0015_
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding:
<!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
<DIV><FONT face=3DArial size=3D2>Will</FONT></DIV>
------=_NextPart_000_0015_
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I use the htmlMimeMail library from phpguru.org. http://www.phpguru.org/sta
There's also a library in the PEAR that does this stuff. See http://devzone.zend.com/no
I would highly recommend the PHPMailer classes. They support both html and plain text emails, along with attachments, smtp authentication, etc.
http://phpmailer.sourcefor
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:
Split: Roonaan {http:#18152512} & jk2001 {http:#18156468} & ingwa {http:#18157813}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
Huji
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: RoonaanPosted on 2006-12-16 at 12:38:05ID: 18152512
You could try and use the imap function family. php.net/imap
-r-