I am successfully getting emails from the SendGrid Parse API. My application sends an email with HTML content to a user and when the user replies from any email client, I am parsing the email and have the html and text attributes of the reply from SendGrid's parsing.
An example text string parameter from the SendGrid Parse payload:
'This is a gmail reply On Mon, Dec 20, 2021 at 10:21 PM <testaccount@parse.mytestdomain.com> wrote:> This is the original email text'
Where the reply text is This is a gmail reply
and the Original email text is This is the original email text
Is there anyway to parse the reply and remove the original quoted text without a Regex of every possible email client treatment of replies??