By rlnorthcutt on
Hi,
I have created a custom profile checkbox on registration asking the user if they want to subscribe to the newsletter. The newsletter is through a 3rd-party site.
I need the registration form to send a confirmation email to the newsletter email address, but only IF they have checked the box.
So, if the box is checked, then an email TO the newsletter system must be sent FROM the registrant...
any ideas?
Ron
Comments
Got it
This is not quite as elegant a solution as I hoped, but it works. Basically, I just created a simple PHP form to send an email IF the checkbox was checked. I then placed this code in the user.module as the new user is created. It seems to work fine. Here is the code if anyone wants it - or if anyone can suggest a better way:
The custom bit inserts on line 241 - the clip above includes lines 237-254 with the code inserted. These items will be dependent on your form and the direct subscribe email:
- profile_CheckBoxName
- profile_FullNameField
- email@direct-response-auto-responder.com
This was for an auto-responder hosted with 1ShoppingCart.
Ron
regards,
Ron Northcutt
Directory of Technical Marketing, Acquia
Subscribing to this thread
Looks like promising code!