Need an email expert to write PHP script that removes previous messages in emails
$30-250 USD
Pagado a la entrega
I have a website that sends out email notifications through Sendgrid. On the emails, I have a from address connected with a Gmail account so any responses I get are sent to this inbox. I would now like to record these responses in a database and forward them using Sendgrid. I'm using the Gmail API to fetch emails from the inbox and store them in my database with a PHP cron job. The problem is that the responses all come with a message history included in the body of the email, which I would like to remove because the message history is already displayed on the website. From what I understand, there is no elegant way to separate them, nor is there a standard format between email providers.
What I need is a PHP (v 7.1) function that reads each email and cuts everything below the actual response message. It needs to be compatible with all popular email providers. It also needs to a return an error if the format is not recognized.
The integrations with Gmail API and Sendgrid are working fine.
Nº del proyecto: #17903275