Closed (fixed)
Project:
Webform
Version:
7.x-3.18
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2013 at 01:41 UTC
Updated:
8 Oct 2013 at 17:26 UTC
I've created a Select options field in my webform with, a different email address next to each option. I would now like the webform to send an email to the email address depending on which option is selected. Is this possible?
Someone suggested using the Component value, but I haven't been able to find any details on how exactly this works and how I need to set it up.
Any help would be greatly appreciated.
Comments
Comment #1
new123456789 commentedI was expecting to see something along the lines of:

But no such luck ...
Comment #2
luthien commentedhttp://www.ostraining.com/blog/drupal/webform-different-emails/
http://drupal.org/node/282436
Comment #3
new123456789 commentedThank you so much for that!
Comment #4
quicksketchThis screenshot is actually from a comment I posted here: http://drupal.org/node/687606#comment-6571082
That issue has a patch in progress that adds the functionality you're looking for, but it's not finished yet. Of course you can use e-mail addresses as the select list keys as pointed out above, but then you run into potential spam problems as noted in #282436: Multiple Options, Same Value in 'Select' Form Element (+ Protect from Spam Harvesters).
Comment #5
new123456789 commentedThanks for that!
Is it possible to have more than one TO email per line, at this stage:

Comment #6
quicksketchYes, I believe you can comma-separate e-mail addresses in the key.
Comment #7
luthien commentedThere is also a custom module (only for Drupal 6) that protects the emails from spam and it works fine. Perhaps you can look at it and try to create a similar module or functionality for Drupal 7.
https://github.com/msmithgu/email_alter
Comment #8
new123456789 commentedThank you!!!
Comment #9
quicksketch#687606: Add conditional email sending feature has now been committed. The feature will be in the next release of the 4.x version of the module.
Comment #11
sophiekovalevsky commentedThanks a lot for this awesome help =)