I spent a considerable amount of time trying to figure this one out. The webform I created would not send an email out to the registrant, but the test webform I created worked nicely. I finally found out that the field "email" must not belong to any fieldset. I placed "email" at the top of the list and it worked just fine.
However, in order for this to work, you also need to place the following code in the Additional Processing field under Webform Advanced Settings:
$to = $form_values['submitted_tree']['email'];
$from = "your email here";
$body = drupal_html_to_text($node->webform['confirmation']);
$message = drupal_mail('webform_extra', 'reply', $to, language_default(), array('body' => $body), $from, TRUE);
function webform_extra_mail($key, &$message, $params) {
$message['subject'] = "your subject here";
$message['body'] = $params['body'];
}
?>
Customize $from and 'subject'
Thanks to drupal.org for this fix. Very helpful.
Here's another link from drupal.org with an alternate solution.
Showing posts with label CMS. Show all posts
Showing posts with label CMS. Show all posts
Thursday, March 17, 2011
Thursday, November 18, 2010
Sending confirmation email in Drupal Webform
Drupal's webform module does not natively send confirmation email. However, I found a workaround that works well and is found here:
http://drupal.org/node/323666
I have yet to look for something though that will send back a copy of the response to the fields.
http://drupal.org/node/323666
I have yet to look for something though that will send back a copy of the response to the fields.
Subscribe to:
Posts (Atom)