I'm running a service where users receive an email every day at the same time, to which they reply (to an unmonitored email account).
I want to capture the following pieces of information from those replies and insert them into a database:
- the sender's email address
- the sender's message (minus the rest of the thread or any email signatures)
- the date (YYYY-MM-DD) of the original email to which they are replying
I gather email piping is one solution, and I've found some libraries which can do the basics, but nothing as complicated as getting the date of the original message, for example.
I'm using PHP but am open to whichever language can achieve this the easiest.
Update:
I'm using MailChimp to send the emails, so maybe I could include something like <span id="YYYY-MM-DD">
using merge tags that the parser searches for?