I am writing an email parser in Python and looking for a way to extract all previous emails (forwarded, replied) from an email body. The script has to support as many email clients as possible (gmail, outlook, iphone, etc.). For example if the body is:
example email text
On Jul 31, 2013, at 5:15 PM, John Doe <jdoe@gmail.com> wrote:
> example email text
>
>
> *From:* Me [mailto:me@gmail.com]
> *Sent:* Thursday, May 31, 2012 3:54 PM
> *To:* John Doe
> *Subject:* RE: subject
>
> example email text
The result should be an array with 3 entries, each entry contains the email text and as many metadata as possible (date, sender, subject, etc.).
Are there any standard / modern ways of achieving this? Is there a maintained list of responses from different clients? I've searched for similar questions but no satisfying answer so far.