Submitted by Eric Weik on Sun, 01/17/2010 - 11:54.
Hi Paul,
I've not actually tried this, but I think the syntax to extend Timothy's example to add recipients based on the subject would look something like this:
<?php switch ($form_values['submitted_tree']['subject']) { case "orders_at_example": // Add two different CC address for "orders_at_example" $node->webform['additional_emails'][] = "orders@example.com"; $node->webform['additional_emails'][] = "fulfillment@otherexample.com"; break; case "info_at_example": $node->webform['additional_emails'][] = "info@example.com"; break; case "support_at_example": $node->webform['additional_emails'][] = "support@example.com"; break; } ?>
Hello! My name is Eric Weik. I am a computer scientist, photographer, musician, and occasional blogger. New Rivers Digital is my software consulting business. I am dedicated to using open source software and open data standards for Web development and applications integration. In particular, I am an ardent Drupal fan and specialize in Drupal module development, theming, and data architecture integration.
Reply to comment
#1 Additional processing with multiple addresses
Submitted by Eric Weik on Sun, 01/17/2010 - 11:54.
Hi Paul,
I've not actually tried this, but I think the syntax to extend Timothy's example to add recipients based on the subject would look something like this:
<?phpswitch ($form_values['submitted_tree']['subject']) {
case "orders_at_example":
// Add two different CC address for "orders_at_example"
$node->webform['additional_emails'][] = "orders@example.com";
$node->webform['additional_emails'][] = "fulfillment@otherexample.com";
break;
case "info_at_example":
$node->webform['additional_emails'][] = "info@example.com";
break;
case "support_at_example":
$node->webform['additional_emails'][] = "support@example.com";
break;
}
?>
-Eric
Reply
About
Hello! My name is Eric Weik. I am a computer scientist, photographer, musician, and occasional blogger. New Rivers Digital is my software consulting business. I am dedicated to using open source software and open data standards for Web development and applications integration. In particular, I am an ardent Drupal fan and specialize in Drupal module development, theming, and data architecture integration.
Contact Details
Lancaster, VA 22503
Content Tags
Abstract B&W Celestial Clouds Drupal 6 Drupal Recipes Drupal Sites Estuary Etsy Government Grasses HDR Long Exposure Macro New Rivers Digital Orton Photoblog Photo Expedition Photoset Renderblog RGB Sketchbook Snow Storm Structure Synth Sunflow Sunset Theming Webform.module Wide Angle Zen Zen ThemingRecent comments
Popular content
Today's:
All time:
Activity Stream
Sun, 01/29/2012 - 22:31
Mon, 01/16/2012 - 10:43
Fri, 01/06/2012 - 07:54
Powered by Drupal & Genesis | Valid XHTML 1.0 Strict |
RSS Feed
© 2010 New Rivers Digital | PO Box 784 | Lancaster, Virginia 22503 | +1-804-577-8526 | Contact Form