User login

Send a confirmation e-mail when a webform is submitted (Drupal 6)

Here's another Benjamin Melançon classic data dump, but the code at the bottom (based directly, as noted, on other's documentation and blog posts) is useful, at least to us.

First answer found, naturally, is the comment "A hacked working copy" in the forum post "How do I create confirmation emails for webforms"
http://drupal.org/node/333249#comment-1107252

Sending confirmation email
http://drupal.org/node/323666

Mostly riffed off this
http://newriversdigital.com/content/content/sending-multiple-customized-confirmation-messages-webformmodule

Instructions to client:

<

blockquote>
It's a remarkably ugly solution for a mature solution such as webform, but you can edit the e-mail subject and body for the demo contact form at:

http://www.example.com/node/171/edit

under "Webform advanced settings", "Additional Processing".

Take care not to remove the "Quotation marks" surrounding the subject or the <<<EOD start of data and end of data EOD; (on its own line) delimiters around the message body, but feel free to edit in between. None of the other code should be touched.

This code should work for any other form also, but you may want to ask us to copy it as needed because some forms will need to include the webform integration code, and others should not have those two lines added.

best,

benjamin

(see my adapted code at bottom)

The names of the components are taken form the field "Field Key" in the fieldset "advanced settings" of the component

That is not a pretty form. The result of a

<?php
 
drupal_set_message
('<pre>' . var_export($form,TRUE) . '</pre>');
?>

in the advanced webform settings post-processing...

array (
  '#theme' => 
  array (
    0 => 'webform_form_171',
    1 => 'webform_form',
  ),
  '#attributes' => 
  array (
    'class' => 'webform-client-form',
    'enctype' => 'multipart/form-data',
  ),
  '#action' => '/demo#demo',
  '#submit' => 
  array (
    0 => 'webform_client_form_submit',
  ),
  '#validate' => 
  array (
    0 => 'webform_client_form_validate',
    1 => 'visitorpath_webform_client_form_validate',
  ),
  'submitted' => 
  array (
    '#tree' => true,
    'company' => 
    array (
      '#type' => 'textfield',
      '#title' => 'Company Name',
      '#default_value' => '',
      '#required' => '1',
      '#weight' => -6.999,
      '#field_prefix' => NULL,
      '#field_suffix' => NULL,
      '#description' => '',
      '#attributes' => 
      array (
      ),
      '#prefix' => '
', '#suffix' => '
',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'company',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'company',
      ),
      '#processed' => true,
      '#input' => true,
      '#size' => 60,
      '#maxlength' => 128,
      '#autocomplete_path' => false,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[company]',
      '#id' => 'edit-submitted-company',
      '#value' => 'Test conf e-mail',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'firstname' => 
    array (
      '#type' => 'textfield',
      '#title' => 'First Name',
      '#default_value' => '',
      '#required' => '1',
      '#weight' => -5.998,
      '#field_prefix' => NULL,
      '#field_suffix' => NULL,
      '#description' => '',
      '#attributes' => 
      array (
      ),
      '#prefix' => '
', '#suffix' => '
',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'firstname',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'firstname',
      ),
      '#processed' => true,
      '#input' => true,
      '#size' => 60,
      '#maxlength' => 128,
      '#autocomplete_path' => false,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[firstname]',
      '#id' => 'edit-submitted-firstname',
      '#value' => 'Horatio',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'lastname' => 
    array (
      '#type' => 'textfield',
      '#title' => 'Last Name',
      '#default_value' => '',
      '#required' => '1',
      '#weight' => -4.997,
      '#field_prefix' => NULL,
      '#field_suffix' => NULL,
      '#description' => '',
      '#attributes' => 
      array (
      ),
      '#prefix' => '
', '#suffix' => '
',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'lastname',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'lastname',
      ),
      '#processed' => true,
      '#input' => true,
      '#size' => 60,
      '#maxlength' => 128,
      '#autocomplete_path' => false,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[lastname]',
      '#id' => 'edit-submitted-lastname',
      '#value' => 'Alger',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'email' => 
    array (
      '#type' => 'textfield',
      '#title' => 'E-mail ',
      '#default_value' => '',
      '#required' => '1',
      '#weight' => -3.996,
      '#description' => '',
      '#attributes' => 
      array (
      ),
      '#prefix' => '
', '#suffix' => '
',
      '#element_validate' => 
      array (
        0 => '_webform_validate_email',
      ),
      '#webform_component' => 
      array (
        'nid' => '171',
        'cid' => '4',
        'form_key' => 'email',
        'name' => 'E-mail ',
        'type' => 'email',
        'value' => '',
        'extra' => 
        array (
          'email' => 0,
          'disabled' => 0,
          'width' => '',
          'description' => '',
          'attributes' => 
          array (
          ),
        ),
        'mandatory' => '1',
        'email' => '1',
        'pid' => '0',
        'weight' => '-4',
        'page_num' => 1,
      ),
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'email',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'email',
      ),
      '#processed' => true,
      '#input' => true,
      '#size' => 60,
      '#maxlength' => 128,
      '#autocomplete_path' => false,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[email]',
      '#id' => 'edit-submitted-email',
      '#value' => 'ben@agaric.com',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'phone' => 
    array (
      '#type' => 'textfield',
      '#title' => 'Phone Number',
      '#default_value' => '',
      '#required' => '1',
      '#weight' => -2.995,
      '#field_prefix' => NULL,
      '#field_suffix' => NULL,
      '#description' => '',
      '#attributes' => 
      array (
      ),
      '#prefix' => '
', '#suffix' => '
',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'phone',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'phone',
      ),
      '#processed' => true,
      '#input' => true,
      '#size' => 60,
      '#maxlength' => 128,
      '#autocomplete_path' => false,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[phone]',
      '#id' => 'edit-submitted-phone',
      '#value' => '1 399 393 9399',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'state' => 
    array (
      '#type' => 'textfield',
      '#title' => 'State or Province',
      '#default_value' => '',
      '#required' => '1',
      '#weight' => -1.994,
      '#field_prefix' => NULL,
      '#field_suffix' => NULL,
      '#description' => '',
      '#attributes' => 
      array (
      ),
      '#prefix' => '
', '#suffix' => '
',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'state',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'state',
      ),
      '#processed' => true,
      '#input' => true,
      '#size' => 60,
      '#maxlength' => 128,
      '#autocomplete_path' => false,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[state]',
      '#id' => 'edit-submitted-state',
      '#value' => 'WA',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'additional_comments__c' => 
    array (
      '#type' => 'textarea',
      '#title' => 'Comments / Requirements',
      '#default_value' => '',
      '#required' => '0',
      '#weight' => -0.993,
      '#description' => '',
      '#rows' => 5,
      '#cols' => 60,
      '#attributes' => 
      array (
      ),
      '#resizable' => false,
      '#prefix' => '
', '#suffix' => '
',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'additional_comments__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'additional_comments__c',
      ),
      '#processed' => true,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[additional_comments__c]',
      '#id' => 'edit-submitted-additional-comments--c',
      '#value' => 'ha
ha
ha
ha
ha',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'conversion_form_title__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 0.008,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'conversion_form_title__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'conversion_form_title__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[conversion_form_title__c]',
      '#id' => 'edit-submitted-conversion-form-title--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'conversion_form_url__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 1.009,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'conversion_form_url__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'conversion_form_url__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[conversion_form_url__c]',
      '#id' => 'edit-submitted-conversion-form-url--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'entrance_page_title__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 2.01,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'entrance_page_title__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'entrance_page_title__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[entrance_page_title__c]',
      '#id' => 'edit-submitted-entrance-page-title--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'entrance_page_url__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 3.011,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'entrance_page_url__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'entrance_page_url__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[entrance_page_url__c]',
      '#id' => 'edit-submitted-entrance-page-url--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'search_and_page_view_history__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 4.012,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'search_and_page_view_history__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'search_and_page_view_history__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[search_and_page_view_history__c]',
      '#id' => 'edit-submitted-search-and-page-view-history--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'keyword_search_string__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 5.013,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'keyword_search_string__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'keyword_search_string__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[keyword_search_string__c]',
      '#id' => 'edit-submitted-keyword-search-string--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'previous_page_title__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 6.014,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'previous_page_title__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'previous_page_title__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[previous_page_title__c]',
      '#id' => 'edit-submitted-previous-page-title--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'previous_page_url__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 7.015,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'previous_page_url__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'previous_page_url__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[previous_page_url__c]',
      '#id' => 'edit-submitted-previous-page-url--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'visitorpath_search_engine' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 8.016,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'visitorpath_search_engine',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'visitorpath_search_engine',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[visitorpath_search_engine]',
      '#id' => 'edit-submitted-visitorpath-search-engine',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'source__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 9.017,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'source__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'source__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[source__c]',
      '#id' => 'edit-submitted-source--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'time_on_website__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 10.018,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'time_on_website__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'time_on_website__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[time_on_website__c]',
      '#id' => 'edit-submitted-time-on-website--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'webformsid__c' => 
    array (
      '#type' => 'hidden',
      '#default_value' => '',
      '#weight' => 11.019,
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'submitted',
        1 => 'webformsid__c',
      ),
      '#array_parents' => 
      array (
        0 => 'submitted',
        1 => 'webformsid__c',
      ),
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'submitted[webformsid__c]',
      '#id' => 'edit-submitted-webformsid--c',
      '#value' => '',
      '#needs_validation' => true,
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    '#post' => 
    array (
      'submitted' => 
      array (
        'company' => 'Test conf e-mail',
        'firstname' => 'Horatio',
        'lastname' => 'Alger',
        'email' => 'ben@agaric.com',
        'phone' => '1 399 393 9399',
        'state' => 'WA',
        'additional_comments__c' => 'ha
ha
ha
ha
ha',
        'conversion_form_title__c' => '',
        'conversion_form_url__c' => '',
        'entrance_page_title__c' => '',
        'entrance_page_url__c' => '',
        'search_and_page_view_history__c' => '',
        'keyword_search_string__c' => '',
        'previous_page_title__c' => '',
        'previous_page_url__c' => '',
        'visitorpath_search_engine' => '',
        'source__c' => '',
        'time_on_website__c' => '',
        'webformsid__c' => '',
      ),
      'details' => 
      array (
        'email_subject' => 'default',
        'email_from_name' => 'default',
        'email_from_address' => 'default',
      ),
      'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
      'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
      'form_id' => 'webform_client_form_171',
    ),
    '#programmed' => false,
    '#parents' => 
    array (
      0 => 'submitted',
    ),
    '#array_parents' => 
    array (
      0 => 'submitted',
    ),
    '#weight' => 0,
    '#processed' => false,
    '#defaults_loaded' => true,
  ),
  'details' => 
  array (
    '#tree' => true,
    'email_subject' => 
    array (
      '#type' => 'hidden',
      '#value' => 'default',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'details',
        1 => 'email_subject',
      ),
      '#array_parents' => 
      array (
        0 => 'details',
        1 => 'email_subject',
      ),
      '#weight' => 0,
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'details[email_subject]',
      '#id' => 'edit-details-email-subject',
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'email_from_name' => 
    array (
      '#type' => 'hidden',
      '#value' => 'default',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'details',
        1 => 'email_from_name',
      ),
      '#array_parents' => 
      array (
        0 => 'details',
        1 => 'email_from_name',
      ),
      '#weight' => 0.001,
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'details[email_from_name]',
      '#id' => 'edit-details-email-from-name',
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'email_from_address' => 
    array (
      '#type' => 'hidden',
      '#value' => 'default',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'details',
        1 => 'email_from_address',
      ),
      '#array_parents' => 
      array (
        0 => 'details',
        1 => 'email_from_address',
      ),
      '#weight' => 0.002,
      '#processed' => true,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#process' => 
      array (
        0 => 'form_expand_ahah',
      ),
      '#name' => 'details[email_from_address]',
      '#id' => 'edit-details-email-from-address',
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    'nid' => 
    array (
      '#type' => 'value',
      '#value' => '171',
      '#post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
      '#programmed' => false,
      '#tree' => true,
      '#parents' => 
      array (
        0 => 'details',
        1 => 'nid',
      ),
      '#array_parents' => 
      array (
        0 => 'details',
        1 => 'nid',
      ),
      '#weight' => 0.003,
      '#processed' => false,
      '#description' => NULL,
      '#attributes' => 
      array (
      ),
      '#required' => false,
      '#input' => true,
      '#name' => 'details[nid]',
      '#id' => 'edit-details-nid',
      '#defaults_loaded' => true,
      '#sorted' => true,
    ),
    '#post' => 
    array (
      'submitted' => 
      array (
        'company' => 'Test conf e-mail',
        'firstname' => 'Horatio',
        'lastname' => 'Alger',
        'email' => 'ben@agaric.com',
        'phone' => '1 399 393 9399',
        'state' => 'WA',
        'additional_comments__c' => 'ha
ha
ha
ha
ha',
        'conversion_form_title__c' => '',
        'conversion_form_url__c' => '',
        'entrance_page_title__c' => '',
        'entrance_page_url__c' => '',
        'search_and_page_view_history__c' => '',
        'keyword_search_string__c' => '',
        'previous_page_title__c' => '',
        'previous_page_url__c' => '',
        'visitorpath_search_engine' => '',
        'source__c' => '',
        'time_on_website__c' => '',
        'webformsid__c' => '',
      ),
      'details' => 
      array (
        'email_subject' => 'default',
        'email_from_name' => 'default',
        'email_from_address' => 'default',
      ),
      'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
      'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
      'form_id' => 'webform_client_form_171',
    ),
    '#programmed' => false,
    '#parents' => 
    array (
      0 => 'details',
    ),
    '#array_parents' => 
    array (
      0 => 'details',
    ),
    '#weight' => 0.001,
    '#processed' => false,
    '#defaults_loaded' => true,
    '#sorted' => true,
  ),
  'submit' => 
  array (
    '#type' => 'submit',
    '#value' => 'Submit',
    '#weight' => 1000,
    '#post' => 
    array (
      'submitted' => 
      array (
        'company' => 'Test conf e-mail',
        'firstname' => 'Horatio',
        'lastname' => 'Alger',
        'email' => 'ben@agaric.com',
        'phone' => '1 399 393 9399',
        'state' => 'WA',
        'additional_comments__c' => 'ha
ha
ha
ha
ha',
        'conversion_form_title__c' => '',
        'conversion_form_url__c' => '',
        'entrance_page_title__c' => '',
        'entrance_page_url__c' => '',
        'search_and_page_view_history__c' => '',
        'keyword_search_string__c' => '',
        'previous_page_title__c' => '',
        'previous_page_url__c' => '',
        'visitorpath_search_engine' => '',
        'source__c' => '',
        'time_on_website__c' => '',
        'webformsid__c' => '',
      ),
      'details' => 
      array (
        'email_subject' => 'default',
        'email_from_name' => 'default',
        'email_from_address' => 'default',
      ),
      'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
      'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
      'form_id' => 'webform_client_form_171',
    ),
    '#programmed' => false,
    '#tree' => false,
    '#parents' => 
    array (
      0 => 'submit',
    ),
    '#array_parents' => 
    array (
      0 => 'submit',
    ),
    '#processed' => true,
    '#description' => NULL,
    '#attributes' => 
    array (
    ),
    '#required' => false,
    '#input' => true,
    '#name' => 'op',
    '#button_type' => 'submit',
    '#executes_submit_callback' => true,
    '#process' => 
    array (
      0 => 'form_expand_ahah',
    ),
    '#id' => 'edit-submit',
    '#defaults_loaded' => true,
    '#sorted' => true,
  ),
  '#parameters' => 
  array (
    0 => 'webform_client_form_171',
    1 => 
    array (
      'storage' => NULL,
      'submitted' => false,
      'post' => 
      array (
        'submitted' => 
        array (
          'company' => 'Test conf e-mail',
          'firstname' => 'Horatio',
          'lastname' => 'Alger',
          'email' => 'ben@agaric.com',
          'phone' => '1 399 393 9399',
          'state' => 'WA',
          'additional_comments__c' => 'ha
ha
ha
ha
ha',
          'conversion_form_title__c' => '',
          'conversion_form_url__c' => '',
          'entrance_page_title__c' => '',
          'entrance_page_url__c' => '',
          'search_and_page_view_history__c' => '',
          'keyword_search_string__c' => '',
          'previous_page_title__c' => '',
          'previous_page_url__c' => '',
          'visitorpath_search_engine' => '',
          'source__c' => '',
          'time_on_website__c' => '',
          'webformsid__c' => '',
        ),
        'details' => 
        array (
          'email_subject' => 'default',
          'email_from_name' => 'default',
          'email_from_address' => 'default',
        ),
        'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c',
        'form_token' => '09502f317e0a929ab62b3f7361aa8fc0',
        'form_id' => 'webform_client_form_171',
      ),
    ),
    2 => 
    stdClass::__set_state(array(
       'nid' => '171',
       'type' => 'webform',
       'language' => '',
       'uid' => '4',
       'status' => '1',
       'created' => '1213709839',
       'changed' => '1291903245',
       'comment' => '0',
       'promote' => '1',
       'moderate' => '0',
       'sticky' => 0,
       'tnid' => '0',
       'translate' => '0',
       'vid' => '1032',
       'revision_uid' => '1',
       'title' => 'Request Demo Form',
       'body' => '
Thank you for your interest in Jonas Software. 
For an immediate response please call 1-888-789-9073 or e-mail sales@jonassoftware.comThe best way to see a product demo is for a one-on-one webinar with one of our experts, customized towards your business processes.  Before proceeding to the demonstration our sales reps will make sure our businesses are the right fit for each other by finding out what your software requirements are. Please fill out the form below and one of our representatives will contact you and set-up a time convenient to you.',
       'teaser' => '
Thank you for your interest in Jonas Software. 
For an immediate response please call 1-888-789-9073 or e-mail sales@jonassoftware.comThe best way to see a product demo is for a one-on-one webinar with one of our experts, customized towards your business processes.  Before proceeding to the demonstration our sales reps will make sure our businesses are the right fit for each other by finding out what your software requirements are. Please fill out the form below and one of our representatives will contact you and set-up a time convenient to you.',
       'log' => '',
       'revision_timestamp' => '1291903245',
       'format' => '1',
       'name' => 'Kevin',
       'picture' => '',
       'data' => 'a:2:{s:13:"form_build_id";s:37:"form-3f601b636261754f7309a97a320c159f";s:9:"nodewords";a:2:{s:11:"description";s:0:"";s:8:"keywords";s:0:"";}}',
       'webform' => 
      array (
        'nid' => '171',
        'confirmation' => 'Thank you for your interest in Jonas Software. One of our representatives will contact you shortly to determine if we have the software required to fill your business needs. 

In the meantime, please feel free to research more on Jonas Construction Software:



   * Download Whitepaper
   * Read articles, newsletters and client success stories
   * Research Products
   * Read More on our Services


',
        'teaser' => '0',
        'submit_text' => '',
        'submit_limit' => '-1',
        'submit_interval' => '-1',
        'email' => '',
        'email_from_name' => 'default',
        'email_from_address' => 'default',
        'email_subject' => 'default',
        'additional_validate' => '',
        'additional_submit' => '\' . var_export($form,TRUE) . \'
\'); // Variables we might need from the form $submitted_email_address = $form[\'submitted\'][\'email\'][\'#value\']; $submitted_first_name = $form[\'submitted\'][\'first_name\'][\'#value\']; $submitted_last_name = $form[\'submitted\'][\'last_name\'][\'#value\']; // Mail setup $to = $submitted_email_address; $from = variable_get(\'site_mail\', \'noreply@example.com\'); // Use this method to load the confirmation message from the webform itself $body = drupal_html_to_text($node->webform[\'confirmation\']); // Use this method to define a custom confirmation message /* $body = " Dear $submitted_first_name $submitted_last_name, Thanks for your interest in our site. Feedback from users is very important to us. Talk to you soon, The Web Team "; */ // Define a hook_mail() callback which drupal_mail() will use to complete the $message structure function webform_extra_mail($key, &$message, $params) { $message[\'subject\'] = "Thanks for contacting us!"; $message[\'body\'] = $params[\'body\']; } // Theme and send the message via drupal_mail() drupal_mail(\'webform_extra\', \'reply\', $to, language_default(), array(\'body\' => $body), $from, TRUE); ?>', 'roles' => array ( 0 => '1', ), 'components' => array ( 1 => array ( 'nid' => '171', 'cid' => '1', 'form_key' => 'company', 'name' => 'Company Name', 'type' => 'textfield', 'value' => '', 'extra' => array ( 'disabled' => 0, 'width' => '', 'maxlength' => '', 'field_prefix' => '', 'field_suffix' => '', 'description' => '', 'attributes' => array ( ), ), 'mandatory' => '1', 'email' => '1', 'pid' => '0', 'weight' => '-7', 'page_num' => 1, ), 2 => array ( 'nid' => '171', 'cid' => '2', 'form_key' => 'firstname', 'name' => 'First Name', 'type' => 'textfield', 'value' => '', 'extra' => array ( 'disabled' => 0, 'width' => '', 'maxlength' => '', 'field_prefix' => '', 'field_suffix' => '', 'description' => '', 'attributes' => array ( ), ), 'mandatory' => '1', 'email' => '1', 'pid' => '0', 'weight' => '-6', 'page_num' => 1, ), 3 => array ( 'nid' => '171', 'cid' => '3', 'form_key' => 'lastname', 'name' => 'Last Name', 'type' => 'textfield', 'value' => '', 'extra' => array ( 'disabled' => 0, 'width' => '', 'maxlength' => '', 'field_prefix' => '', 'field_suffix' => '', 'description' => '', 'attributes' => array ( ), ), 'mandatory' => '1', 'email' => '1', 'pid' => '0', 'weight' => '-5', 'page_num' => 1, ), 4 => array ( 'nid' => '171', 'cid' => '4', 'form_key' => 'email', 'name' => 'E-mail ', 'type' => 'email', 'value' => '', 'extra' => array ( 'email' => 0, 'disabled' => 0, 'width' => '', 'description' => '', 'attributes' => array ( ), ), 'mandatory' => '1', 'email' => '1', 'pid' => '0', 'weight' => '-4', 'page_num' => 1, ), 5 => array ( 'nid' => '171', 'cid' => '5', 'form_key' => 'phone', 'name' => 'Phone Number', 'type' => 'textfield', 'value' => '', 'extra' => array ( 'disabled' => 0, 'width' => '', 'maxlength' => '', 'field_prefix' => '', 'field_suffix' => '', 'description' => '', 'attributes' => array ( ), ), 'mandatory' => '1', 'email' => '1', 'pid' => '0', 'weight' => '-3', 'page_num' => 1, ), 6 => array ( 'nid' => '171', 'cid' => '6', 'form_key' => 'state', 'name' => 'State or Province', 'type' => 'textfield', 'value' => '', 'extra' => array ( 'disabled' => 0, 'width' => '', 'maxlength' => '', 'field_prefix' => '', 'field_suffix' => '', 'description' => '', 'attributes' => array ( ), ), 'mandatory' => '1', 'email' => '1', 'pid' => '0', 'weight' => '-2', 'page_num' => 1, ), 7 => array ( 'nid' => '171', 'cid' => '7', 'form_key' => 'additional_comments__c', 'name' => 'Comments / Requirements', 'type' => 'textarea', 'value' => '', 'extra' => array ( 'resizable' => 0, 'disabled' => 0, 'cols' => '', 'rows' => '', 'description' => '', 'attributes' => array ( ), ), 'mandatory' => '0', 'email' => '1', 'pid' => '0', 'weight' => '-1', 'page_num' => 1, ), 15 => array ( 'nid' => '171', 'cid' => '15', 'form_key' => 'conversion_form_title__c', 'name' => 'conversion_title', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '0', 'page_num' => 1, ), 16 => array ( 'nid' => '171', 'cid' => '16', 'form_key' => 'conversion_form_url__c', 'name' => 'conversion_url', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '1', 'page_num' => 1, ), 11 => array ( 'nid' => '171', 'cid' => '11', 'form_key' => 'entrance_page_title__c', 'name' => 'entrance_title', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '2', 'page_num' => 1, ), 12 => array ( 'nid' => '171', 'cid' => '12', 'form_key' => 'entrance_page_url__c', 'name' => 'entrance_url', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '3', 'page_num' => 1, ), 18 => array ( 'nid' => '171', 'cid' => '18', 'form_key' => 'search_and_page_view_history__c', 'name' => 'full_history', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '4', 'page_num' => 1, ), 10 => array ( 'nid' => '171', 'cid' => '10', 'form_key' => 'keyword_search_string__c', 'name' => 'keywords', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '5', 'page_num' => 1, ), 13 => array ( 'nid' => '171', 'cid' => '13', 'form_key' => 'previous_page_title__c', 'name' => 'previous_title', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '6', 'page_num' => 1, ), 14 => array ( 'nid' => '171', 'cid' => '14', 'form_key' => 'previous_page_url__c', 'name' => 'previous_url', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '7', 'page_num' => 1, ), 9 => array ( 'nid' => '171', 'cid' => '9', 'form_key' => 'visitorpath_search_engine', 'name' => 'search_engine', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '0', 'email' => '0', 'pid' => '0', 'weight' => '8', 'page_num' => 1, ), 8 => array ( 'nid' => '171', 'cid' => '8', 'form_key' => 'source__c', 'name' => 'source', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '9', 'page_num' => 1, ), 17 => array ( 'nid' => '171', 'cid' => '17', 'form_key' => 'time_on_website__c', 'name' => 'timeonsite', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '10', 'page_num' => 1, ), 19 => array ( 'nid' => '171', 'cid' => '19', 'form_key' => 'webformsid__c', 'name' => 'SID Key', 'type' => 'hidden', 'value' => '', 'extra' => array ( 'email' => 0, ), 'mandatory' => '1', 'email' => '0', 'pid' => '0', 'weight' => '11', 'page_num' => 1, ), ), 'additional_emails' => array ( ), 'addblock' => true, ), 'path' => 'demo', 'field_image' => array ( 0 => NULL, ), 'use_salesforce' => true, 'node_weight' => 0, 'visitorpath' => true, '0' => false, 'taxonomy' => array ( ), 'files' => array ( ), 'iids' => array ( 0 => '249', ), 'page_title' => 'Construction Software Demo Request Form', 'nodewords' => array ( 'description' => array ( 'value' => '', ), 'keywords' => array ( 'value' => '', ), ), 'build_mode' => 0, )), 3 => array ( ), 4 => true, 5 => false, ), '#build_id' => 'form-9a6f57e78987a6fb8cc046689b63ffb8', '#type' => 'form', '#programmed' => false, 'form_build_id' => array ( '#type' => 'hidden', '#value' => 'form-9a6f57e78987a6fb8cc046689b63ffb8', '#id' => 'form-9a6f57e78987a6fb8cc046689b63ffb8', '#name' => 'form_build_id', '#post' => array ( 'submitted' => array ( 'company' => 'Test conf e-mail', 'firstname' => 'Horatio', 'lastname' => 'Alger', 'email' => 'ben@agaric.com', 'phone' => '1 399 393 9399', 'state' => 'WA', 'additional_comments__c' => 'ha ha ha ha ha', 'conversion_form_title__c' => '', 'conversion_form_url__c' => '', 'entrance_page_title__c' => '', 'entrance_page_url__c' => '', 'search_and_page_view_history__c' => '', 'keyword_search_string__c' => '', 'previous_page_title__c' => '', 'previous_page_url__c' => '', 'visitorpath_search_engine' => '', 'source__c' => '', 'time_on_website__c' => '', 'webformsid__c' => '', ), 'details' => array ( 'email_subject' => 'default', 'email_from_name' => 'default', 'email_from_address' => 'default', ), 'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c', 'form_token' => '09502f317e0a929ab62b3f7361aa8fc0', 'form_id' => 'webform_client_form_171', ), '#programmed' => false, '#tree' => false, '#parents' => array ( 0 => 'form_build_id', ), '#array_parents' => array ( 0 => 'form_build_id', ), '#weight' => 0.003, '#processed' => true, '#description' => NULL, '#attributes' => array ( ), '#required' => false, '#input' => true, '#process' => array ( 0 => 'form_expand_ahah', ), '#defaults_loaded' => true, '#sorted' => true, ), '#token' => 'webform_client_form_171', 'form_token' => array ( '#id' => 'edit-webform-client-form-171-form-token', '#type' => 'token', '#default_value' => '09502f317e0a929ab62b3f7361aa8fc0', '#post' => array ( 'submitted' => array ( 'company' => 'Test conf e-mail', 'firstname' => 'Horatio', 'lastname' => 'Alger', 'email' => 'ben@agaric.com', 'phone' => '1 399 393 9399', 'state' => 'WA', 'additional_comments__c' => 'ha ha ha ha ha', 'conversion_form_title__c' => '', 'conversion_form_url__c' => '', 'entrance_page_title__c' => '', 'entrance_page_url__c' => '', 'search_and_page_view_history__c' => '', 'keyword_search_string__c' => '', 'previous_page_title__c' => '', 'previous_page_url__c' => '', 'visitorpath_search_engine' => '', 'source__c' => '', 'time_on_website__c' => '', 'webformsid__c' => '', ), 'details' => array ( 'email_subject' => 'default', 'email_from_name' => 'default', 'email_from_address' => 'default', ), 'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c', 'form_token' => '09502f317e0a929ab62b3f7361aa8fc0', 'form_id' => 'webform_client_form_171', ), '#programmed' => false, '#tree' => false, '#parents' => array ( 0 => 'form_token', ), '#array_parents' => array ( 0 => 'form_token', ), '#weight' => 0.004, '#processed' => false, '#description' => NULL, '#attributes' => array ( ), '#required' => false, '#input' => true, '#name' => 'form_token', '#value' => '09502f317e0a929ab62b3f7361aa8fc0', '#needs_validation' => true, '#defaults_loaded' => true, '#sorted' => true, ), 'form_id' => array ( '#type' => 'hidden', '#value' => 'webform_client_form_171', '#id' => 'edit-webform-client-form-171', '#post' => array ( 'submitted' => array ( 'company' => 'Test conf e-mail', 'firstname' => 'Horatio', 'lastname' => 'Alger', 'email' => 'ben@agaric.com', 'phone' => '1 399 393 9399', 'state' => 'WA', 'additional_comments__c' => 'ha ha ha ha ha', 'conversion_form_title__c' => '', 'conversion_form_url__c' => '', 'entrance_page_title__c' => '', 'entrance_page_url__c' => '', 'search_and_page_view_history__c' => '', 'keyword_search_string__c' => '', 'previous_page_title__c' => '', 'previous_page_url__c' => '', 'visitorpath_search_engine' => '', 'source__c' => '', 'time_on_website__c' => '', 'webformsid__c' => '', ), 'details' => array ( 'email_subject' => 'default', 'email_from_name' => 'default', 'email_from_address' => 'default', ), 'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c', 'form_token' => '09502f317e0a929ab62b3f7361aa8fc0', 'form_id' => 'webform_client_form_171', ), '#programmed' => false, '#tree' => false, '#parents' => array ( 0 => 'form_id', ), '#array_parents' => array ( 0 => 'form_id', ), '#weight' => 0.005, '#processed' => true, '#description' => NULL, '#attributes' => array ( ), '#required' => false, '#input' => true, '#process' => array ( 0 => 'form_expand_ahah', ), '#name' => 'form_id', '#defaults_loaded' => true, '#sorted' => true, ), '#id' => 'webform-client-form-171', '#description' => NULL, '#required' => false, '#tree' => false, '#parents' => array ( ), '#method' => 'post', '#after_build' => array ( 0 => 'wysiwyg_process_form', ), '#post' => array ( 'submitted' => array ( 'company' => 'Test conf e-mail', 'firstname' => 'Horatio', 'lastname' => 'Alger', 'email' => 'ben@agaric.com', 'phone' => '1 399 393 9399', 'state' => 'WA', 'additional_comments__c' => 'ha ha ha ha ha', 'conversion_form_title__c' => '', 'conversion_form_url__c' => '', 'entrance_page_title__c' => '', 'entrance_page_url__c' => '', 'search_and_page_view_history__c' => '', 'keyword_search_string__c' => '', 'previous_page_title__c' => '', 'previous_page_url__c' => '', 'visitorpath_search_engine' => '', 'source__c' => '', 'time_on_website__c' => '', 'webformsid__c' => '', ), 'details' => array ( 'email_subject' => 'default', 'email_from_name' => 'default', 'email_from_address' => 'default', ), 'form_build_id' => 'form-b7f4c68b1b1ecb42252a2828042f951c', 'form_token' => '09502f317e0a929ab62b3f7361aa8fc0', 'form_id' => 'webform_client_form_171', ), '#processed' => false, '#defaults_loaded' => true, '#after_build_done' => true, )
<?php
/*  Edit the confirmation e-mail subject and body here: */
$subject = "Thanks for contacting us!";
$body = <<<EOD
Dear [first_name] [last_name],

Thank you for your interest in Jonas Software. One of our representatives
will contact you shortly to determine if we have the software required to
fill your business needs.

EOD;

/** Salesforce integration code **/
require_once(drupal_get_path('module', 'salesforcewebform') . '/salesforcewebform.module');
$form_state = salesforcewebform_process($form, $form_state);

/** Confirmation e-mail code **/
// Variables we might need from the form
$email = $form['submitted']['email']['#value'];
$firstname = $form['submitted']['firstname']['#value'];
$lastname = $form['submitted']['lastname']['#value'];

// Mail setup
$to = $email;
$from = variable_get('site_mail', 'noreply@example.com');

// Use this method to load the confirmation message from the webform itself.
// $body = drupal_html_to_text($node->webform['confirmation']);
// Leave commented out to use the custom confirmation message body defined above.
$body = str_replace(array('[first_name]', '[last_name]'), array($firstname, $lastname), $body);

// Define a hook_mail() callback which drupal_mail() will use to complete the $message structure
function webform_extra_mail($key, &$message, $params) {
 
$message['subject'] = $subject;
 
$message['body'] = $params['body'];
}

// Theme and send the message via drupal_mail()
drupal_mail('webform_extra', 'reply', $to, language_default(), array('body' => $body), $from, TRUE);
?>
Searched words: 
drupal webform send confirmation e-mail drupal webform email from address drupal webform email confirmation

Comments

But why is all this

But why is all this necessary? To get a confirmation mail, you simply instruct Webform to send two mails per submission. One to the admin, another one back to the sender, to the e-mail address they provided. Couldn't be simpler than that...

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.