owner Posted April 2, 2010 Share Posted April 2, 2010 Hello, I am able to send/receive email fine with my script, but I am having problems processing an email when one is received. Right now when I receive an email from some people where the email is in text/plain it is really easy to process via matching a few keywords. However, if I get an email from outlook that is whole different story My goal is to figure out how to make a function grab key things out of the email regardless of which mail client the user uses (Sender, Date, Body, etc). If the user sends a html email, I would like to have it filter both so you can see both the html version and plaintext version. Does php have any built in functions or will I have to use a lot of regex and explode? Here is an example of what a "simple" outlook email looks like: ------=_NextPart_000_0009_01CAD1EE.8055F8E0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40">HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii">(filtered medium)">vlink=3Dpurple> style=3D'color:#1F497D'>test class=3DMsoNormal>style=3D'font-size:26.0pt;color:red'>123425634567p> 1.0pt;padding:3.0pt 0in 0in 0in'> style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:= = ***** [mailto:*****@*******.com] Sent: Thursday, = April 01, 2010 10:07 PM To: = *****@*******.com Subject: = test class=3DMsoNormal> Test from = outlook! ------=_NextPart_000_0009_01CAD1EE.8055F8E0-- Best Regards, owner Link to comment https://forums.phpfreaks.com/topic/197315-html-email/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.