I am looking to set up one PHP file to sort and respond to emails. It is sort of a subscription-based email alert system.
So I need script that will check the body content of an email, then respond to the email with some small amount of plain text.
For example: Email from user = A Email from server = B
B: Thank you for your subscription! Reply YES to confirm or CANCEL. A: YES B: You've been added to the list.
Then I would also need code to add email address to a mailing list and also code to remove email from mailing list.
I am using cPanel to create mailing list and set up a filtering system which only allows Pipe to Program, no respond with templates.
I have researched the topic, but there are not that many references anywhere on this type of coding.
MAIN FOCUS:
- If body of email contains "XXX" then respond with body only "YYY".
- If body of email contains "XXX" then add email to mailing list and respond with body only "YYY".