Conditional e-mails based on radio buttons Drupal Webform I've built a form at http://dev.vies.dk/tilmelding. In the backend, it is easy to send e-mails to people filling out the form.

However, I need to send additional e-mails to other people based on some of the answers in the webform, namely the subjects they choose and the sex they have.

Subject         Female       Male
Soccer          mail@mail.dk mail@mail.dk
Handball        my@mail.dk   your@mail.dk
Kayak           mail@mail.dk mail@mail.dk
Dance           be@mail.dk   eb@mail.dk
Biking          sv@mail.dk   ls@mail.dk


Is there a hook, where this can be programmed, so I can achieve what I want?
Yes, you want to use hook_mail_alter() in a custom module. This will intercept the outgoing email from Drupal and allow you to add programming logic to the process. For example you could:


Load the webform in question and view its results.
alter the to value of the $message to meet your needs.



  'to': The address or addresses the message will be sent to. The
  formatting of this string will be validated with the PHP e-mail
  validation filter.