Search code examples
phpemailemail-parsing

How to parse a message to only extract the body, every time?


I'm coding an email piping and I'm getting the message and everything but I'm struggling when it comes to extracting the new user reply and add it to the ticket log.

Some email clients add something like "On 2011-03-14, at 6:00 AM, Stack Overflow wrote:" before older messages other don't... I'm completely lost.

Please help.


Solution

  • The text "on xxx, foo wrote" is part of the email text because the author's included that automatically and the author did not delete it. So you apparently did everything right :)