O'Reilly logo

Drupal 7 Webform Cookbook by Douglas Vernon Denny

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending an e-mail

The final two functions in our custom action module will build and send the notification e-mail to those speakers whose presentation submissions have been declined.

How to do it...

Let's wrap up our Webform extension module by coding the functions that will send out the notification e-mail.

/** * Build and send notification email. */ function webform_custom_action_speaker_status_email($submission) { // Get some of the submitted data. $speaker_name = $submission->data[1]['value'][0] . ' ' . $submission->data[2]['value'][0]; $to_email_address = $submission->data[3]['value'][0]; $presentation_title = $submission->data[4]['value'][0]; // Find out if html emails are possible. $html_capable = webform_email_html_capable(); // Build email ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required