Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Sending multiple emails from a single form
A client of mine has asked me to implement a referral scheme for his customers with the following functionality:
The customer completes a form the website supplying their own name and email address plus the name and email address of the person they are referring. On successful completion of the form, the following should happen:
1. An email is sent to the website owner with the details of the person being referred and the referring customer. (Easily achieved using ZCR).
2. An email is sent to the referring customer, thanking them for the referral and giving them a discount voucher as a reward.
3. An email is sent to the person being referred, with a discount voucher to be used against their first purchase.
As mentioned above, the first email is simply done using ZCR, no problem. However, any ideas how I can automatically initiate the second and third emails using just Textpattern, various plug-ins and maybe a sprinkling of PHP?
Ideally the second and third emails would be HTML emails and would be customisable by my client. I was thinking they could be articles from a hidden section in Textpattern with my client choosing which offer is currently active by setting the status to live whilst inactive offers are hidden or pending.
Can ZCR be tweaked to initiate the second and third emails in the background using the send article feature without a form needing to filled in on the front end for each one? Possibly by using a cleverly-coded “thanks” form from the publicly visible form that collects the data?
Any help, pointers or useful advice gratefully received!
Offline