Hi,
Ive got a 6.x drupal site and I need a way to have my webforms fire off confirmation emails to the users who submit them. I found this post that shows a snippet that will make this happen when placed in the "additional Processing" field but it's for 5.x versions. Can someone tell this PHP rookie a snippet that would make my webform fire off a confirmation email to the user?
Thanks a whole bunch!
Comments
Comment #1
quicksketchYou can easily setup a sort of confirmation simply by using the "Conditional e-mail recipients" feature of Webform. Create an "email" component in which the user enters their email. Then on the main node edit form underneath the normal "E-mail" field, check the box for the email component you created in the Conditional e-mail recipients fieldset. the user will then receive a copy of the e-mail that the administrator received. If you want to change that e-mail, you can follow the theming instructions in THEMING.txt.
Comment #2
vancouverWill commentedYeah I'm having problems with this too. I thought using the "email" type when selecting a new field would work as there is an option to send a confirmation email but that doesn't seem to be working either.
Comment #3
gtothab commentedHey,
Allan D. was kind enough to post this for me in the forums and it made my webform send a confirmation email to users
Here it is:
The function drupal_mail relies in a hook_mail_alter or module_mail for the email body to be set. A quick look into the core hook_mails didn't expose a simple module to choose from, so I've hacked together the following:
The must be an easier way to do this, but it works. I can do tests from work, and they came through with the body intact. :)
If you use one of the HTML mail modules, then there will be a cleaner way of doing this.
Best of luck
Alan
Alan Davison