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

new123456789’s picture

I was expecting to see something along the lines of:
webform email map

But no such luck ...

new123456789’s picture

Thank you so much for that!

quicksketch’s picture

This 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).

new123456789’s picture

Thanks for that!

Is it possible to have more than one TO email per line, at this stage:
Only local images are allowed.

quicksketch’s picture

Is it possible to have more than one TO email per line, at this stage:

Yes, I believe you can comma-separate e-mail addresses in the key.

luthien’s picture

There 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

new123456789’s picture

Thank you!!!

quicksketch’s picture

Status: Active » Fixed

#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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sophiekovalevsky’s picture

Thanks a lot for this awesome help =)