I have a script that extracts data from a number (3) of standardized e-mails that requires fixing.
The object of the script:
- recognize which standard e-mail is received (by sender and by content)
- search e-mail for product ID and voucher code
- store voucher in database
- move e-mail to read folder
- send confirmation e-mail (or error e-mail when failed)
The current script produces error messages.
It has problems with the HTML in the e-mails.
Maybe a complete overhaul works best.