My application receives email from users. A response from gmail, for example, comes in like this:
This is some new text
On Sun, Apr 1, 2012 at 3:32 AM, My app <
4f77ed3860c258a567aeabf8@myapp.com> wrote:
> Original...
> message..
Of course, this treatment varies from client to client.
Right now I am identifying the '4f77ed3860c258a567aeabf8' and throwing out everything after, because I know what email address they've sent to. This is not a general solution but works for my purposes, except for when there's a line break in the "Original message" line, like in the above example.
Is there a better, standard way to strip out past message's from a user's reply to an email?