Answers.Body: <p>I always use the Webform -> E-mails tab for this -> and then I can pick any Component to send an Email - in the example below I want to send an Email to the address that a user typed into the Email field.</p>
  
  <p><a href="https://i.sstatic.net/oIjhg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oIjhg.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-03T03:03:41.630Z
Answers.Text: Just a short addendum to Karin's answer - spinsheet wrote "get an email based on one of the options selected on the form" - check out the Conditionals tab and choices for setting webform conditions, and create something like 'send an e-mail to Email address entered on the form if value entered for component X = Y ).
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-15T16:44:49.330Z
Answers.Text: Exactly - good example!
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T21:58:59.380Z
Answers.LastActivityDate: 2016-07-15T21:58:59.380Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>I'm using Drupal 7 and CiviCRM 4.7.3. I've built a Drupal webform and I want a user to be able to submit the form and get an email based on one of the options selected on the form. So far that part works fine if I send an email to the logged in Drupal user.</p>
  
  <p>I'm having an issue sending an email to an anonymous user based on the value of the email field within the form. I tried using the following token (in the 'To' field in the Drupal rule):</p>
  
  <pre><code>[submission:values:civicrm_1_contact_1_fieldset_fieldset:civicrm_1_contact_1_email_email]
  </code></pre>
  
  <p>But that didn't work. I also tried to use PHP evaluation by using:</p>
  
  <pre><code>&lt;?php print $form['submitted']['civicrm_1_contact_1_fieldset_fieldset']['civicrm_1_contact_1_email_email']['value'][0]; ?&gt;
  </code></pre>
  
  <p>But that didn't work either.</p>
  
  <p>I also added the token in the body of the email and changed the 'To' field to send to the logged in user. That email went through but where the token was in the body of the email was blank, this is telling me I have something wrong with the way my token is set up.</p>
  
  <p>Can anyone offer any suggestions as to what I might be able to do?</p>
  
Tags: <webform-civicrm>
Title: Drupal webform submission, send email to email address in form
ThreadText: # Drupal webform submission, send email to email address in form
  
  (Asked by: username_0 on 2016-07-15)
  
  I'm using Drupal 7 and CiviCRM 4.7.3. I've built a Drupal webform and I want a user to be able to submit the form and get an email based on one of the options selected on the form. So far that part works fine if I send an email to the logged in Drupal user.
  I'm having an issue sending an email to an anonymous user based on the value of the email field within the form. I tried using the following token (in the 'To' field in the Drupal rule):
  [submission:values:civicrm_1_contact_1_fieldset_fieldset:civicrm_1_contact_1_email_email]
  
  But that didn't work. I also tried to use PHP evaluation by using:
  
  
  But that didn't work either.
  I also added the token in the body of the email and changed the 'To' field to send to the logged in user. That email went through but where the token was in the body of the email was blank, this is telling me I have something wrong with the way my token is set up.
  Can anyone offer any suggestions as to what I might be able to do?
  
  **Tags:** webform-civicrm
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-15. Score: 3
  
  I always use the Webform -> E-mails tab for this -> and then I can pick any Component to send an Email - in the example below I want to send an Email to the address that a user typed into the Email field.
  
  [![enter image description here](https://i.sstatic.net/oIjhg.png)](https://i.sstatic.net/oIjhg.png)
  
  > **Comments:**
  > **username_2**: Just a short addendum to Karin's answer - username_0 wrote "get an email based on one of the options selected on the form" - check out the Conditionals tab and choices for setting webform conditions, and create something like 'send an e-mail to Email address entered on the form if value entered for component X = Y ).  
  > **username_1**: Exactly - good example!  
  
  ---
  
  