PHP - Filtering Email Body, Removing Reply Quotes -


I am working on an email piping script for which only the reply content needs to be saved, not the original quoted email . I'm using a Mime Parser Class (http://www.phpclasses.org/package/3169-PHP-Decode-MIME-e-mail-messages.html) to get all the information from email:

  Message ID: AANLkTimYRxMJwjLSdcDP5ksM=xxx@mail.gmail.com Reply ID: 20110316205225.xxx@example.com Subject: Again messageX: from q1-1234567890@example.com: Someone @ Someothersite.com Body: Hello, blah blah blah-sony, Wednesday, March 16, 2011 at 3:52 pm, & lt; Q1-1234567890@example.com> Written: & gt; Hello, & gt; & Gt; Some other blows, Blah, Blah & Gt; & Gt; Thanks, & gt; I'm getting the basic quoted email in the body section, how do I filter it? I know that email clients often "next to quoted content, but I'm not sure that this would be great. Thanks for your help.   

? (^ & Gt; * * (\ N | $) + # miles ',', $ text);

Comments