Last updated 19 December 2016. Created on 23 June 2008.
Edited by niyon, jrockowitz, quicksketch, ianthomas_uk. Log in to edit this page.

Webform can send e-mails to different recipients based on the value of a select list, radio buttons, or checkboxes. To set up a conditional recipient:

  • Click the "Webform" tab on the node to list the components in the form
  • Enter name of field, e.g. "Kind of inquiry"
  • Choose "Select options" as the type of component.
  • Click "Add".
  • The "Edit component" screen appears.
  • Enter a Label and Field key e.g. "Kind of inquiry", "kind_inquiry"
  • In the field "Options" add a list of values.
    • Webform 4
      Enter a list of values as you would normally, such as:
      general|General information
      sales|Sales question
      technical|Technical question
    • Webform 3
      You must use the e-mail addresses as keys such as:|General information|Sales question|Technical question
  • Save your changes.

After the component has been set up, you now need to configure the e-mail.

  • Under the "Webform" tab, click the sub-tab for "E-mails".
  • Choose the component you set up to be the recipient and click "Add".
  • In Webform 3, the keys of the select component will be used as the recipients. In Webform 4, you may choose a separate recipient for each option as part of the configuration.

Looking for support? Visit the forums, or join #drupal-support in IRC.


jazanne’s picture

Is there anyway to use more than component for these conditional?
Like if I want two look at two form fields at a time to decide who gets e-mailed?

Prodigy’s picture

QuickSketch originally wrote this in 2008.

Easier Way as of October 15

Let's say you have conditional recipients based on 'state' or 'email' if that's a select list.

All one must do is click the 'Webform Tab' and click on 'emails'. Here you select your options that determine where your email will go. It's very intuitive and works great

Thanks Nate(quicksketch)

HannahMR’s picture

I couple of notes for people as I had a bit of trouble getting this to work.

The "Component e-mail options" only appear under certain circumstances.

I had to change "Load a pre-built option list" to none for my select component and have 50 or less options before I could see the email options in the email settings.


was.uthm’s picture

I have the same problem, cannot use list more than 49 as reported here
Is there any solution ?

HannahMR’s picture

If I remember right the solutions I came up with was to either limit my options to 50 or to hack the module.

I looked into hacking the module and it was easy, just one line where you needed to change "50" to whatever the limit needs to be for you. But in the end limiting my options was workable so that's what we went with.

Sorry I don't have anything more sophisticated than that for you!


was.uthm’s picture

I have found the solution, there is a webform setting (admin/config) under advanced option.
The default is 50. This can be increased.

I found the solution here:

HannahMR’s picture

Good to know.


shashikanthd2702’s picture

This useful info, Thank you

ashish_6888’s picture

Hi there, I am trying to achieve the conditional email using webform that can send e-mails to different recipients based on the value of a select list in DRUPAL 8. But did not get success. It seems like webform structure for Drupal 8 is bit different from Drupal 7. can anyone please help me for the same..

shashikanthd2702’s picture

If webform have more than one select option, How to send email to different mail-id based on selection of both select option. Can anyone help me out of this.