Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.1003
diff -u -p -r1.1003 system.module
--- modules/system/system.module	4 Jan 2011 00:56:23 -0000	1.1003
+++ modules/system/system.module	21 Jan 2011 18:39:21 -0000
@@ -3073,8 +3073,8 @@ function system_action_info() {
  */
 function system_send_email_action_form($context) {
   // Set default values for form.
-  if (!isset($context['recipient'])) {
-    $context['recipient'] = '';
+  if (!isset($context['recipients'])) {
+    $context['recipients'] = '';
   }
   if (!isset($context['subject'])) {
     $context['subject'] = '';
@@ -3083,12 +3083,12 @@ function system_send_email_action_form($
     $context['message'] = '';
   }
 
-  $form['recipient'] = array(
+  $form['recipients'] = array(
     '#type' => 'textfield',
-    '#title' => t('Recipient'),
-    '#default_value' => $context['recipient'],
+    '#title' => t('Recipients'),
+    '#default_value' => $context['recipients'],
     '#maxlength' => '254',
-    '#description' => t('The email address to which the message should be sent OR enter [node:author:mail], [comment:author:mail], etc. if you would like to send an e-mail to the author of the original post.'),
+    '#description' => t('The email address(es) to which the message should be sent OR enter [node:author:mail], [comment:author:mail], etc., if you would like to send an e-mail to the author of the original post. Use commas to separate multiple recipients.'),
   );
   $form['subject'] = array(
     '#type' => 'textfield',
@@ -3114,10 +3114,12 @@ function system_send_email_action_form($
 function system_send_email_action_validate($form, $form_state) {
   $form_values = $form_state['values'];
   // Validate the configuration form.
-  if (!valid_email_address($form_values['recipient']) && strpos($form_values['recipient'], ':mail') === FALSE) {
-    // We want the literal %author placeholder to be emphasized in the error message.
-    form_set_error('recipient', t('Enter a valid email address or use a token e-mail address such as %author.', array('%author' => '[node:author:mail]')));
-  }
+  foreach (explode(',', $form_values['recipients']) as $recipient) {
+    if (!valid_email_address(trim($recipient)) && strpos(trim($recipient), ':mail') === FALSE) {
+      // We want the literal %author placeholder to be emphasized in the error message.
+      form_set_error('recipients', t('Enter valid comma separated email address(es) or use a token e-mail address such as %author.', array('%author' => '[node:author:mail]')));
+    }
+  }  
 }
 
 /**
@@ -3128,7 +3130,7 @@ function system_send_email_action_submit
   // Process the HTML form to store configuration. The keyed array that
   // we return will be serialized to the database.
   $params = array(
-    'recipient' => $form_values['recipient'],
+    'recipients' => $form_values['recipients'],
     'subject'   => $form_values['subject'],
     'message'   => $form_values['message'],
   );
@@ -3143,7 +3145,7 @@ function system_send_email_action_submit
  *   provided.
  * @param array $context
  *   Array with the following elements:
- *   - 'recipient': E-mail message recipient. This will be passed through
+ *   - 'recipients': E-mail message recipients. This will be passed through
  *     token_replace().
  *   - 'subject': The subject of the message. This will be passed through
  *     token_replace().
@@ -3158,12 +3160,12 @@ function system_send_email_action($entit
     $context['node'] = $entity;
   }
 
-  $recipient = token_replace($context['recipient'], $context);
+  $recipients = token_replace($context['recipients'], $context);
 
   // If the recipient is a registered user with a language preference, use
   // the recipient's preferred language. Otherwise, use the system default
   // language.
-  $recipient_account = user_load_by_mail($recipient);
+  $recipient_account = user_load_by_mail($recipients);
   if ($recipient_account) {
     $language = user_preferred_language($recipient_account);
   }
@@ -3172,11 +3174,11 @@ function system_send_email_action($entit
   }
   $params = array('context' => $context);
 
-  if (drupal_mail('system', 'action_send_email', $recipient, $language, $params)) {
-    watchdog('action', 'Sent email to %recipient', array('%recipient' => $recipient));
+  if (drupal_mail('system', 'action_send_email', $recipients, $language, $params)) {
+    watchdog('action', 'Sent email to %recipients', array('%recipients' => $recipients));
   }
   else {
-    watchdog('error', 'Unable to send email to %recipient', array('%recipient' => $recipient));
+    watchdog('error', 'Unable to send email to %recipients', array('%recipients' => $recipients));
   }
 }
 
