--- modules/forward/forward.old.module	2006-09-17 12:47:47.000000000 -0700
+++ modules/forward/forward.module	2007-01-24 13:08:39.000000000 -0800
@@ -94,6 +94,13 @@ function forward_settings() {
     '#collapsible' => TRUE,
     '#collapsed' => FALSE
   );
+  $form['forward_options']['forward_bcc_recipients'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Bcc all recipient email addresses'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('forward_bcc_recipients', FALSE),
+    '#description' => t('If checked, the \'To\' address will be the sending user\'s email address'),
+  );
   $form['forward_options']['forward_link_type'] = array(
     '#type' => 'checkbox',
     '#title' => t('Use Node Type in Link'),
@@ -585,16 +592,25 @@ function forward_form_submit($form_id, $
   $body = theme('forward_'.$emailtype, $vars);
   $subject = t(variable_get('forward_'.$emailtype.'subject', '%name has sent you a message from %site'), array('%name' => $edit['yname'], '%site' => variable_get('site_name', 'drupal')));
 
-  $headers = "From: ".$edit['yemail']."\n";
+  $headers = "From: ".variable_get('forward_sender_addy', "NoReply@".$host['host'])."\n";
   $headers .= "MIME-Version: 1.0\n";
   $headers .= "Content-type: text/html; charset=utf-8\n";
-
+  
   $recipients = trim($edit['recipients']);
   $recipients = str_replace(array("\r\n", "\n", "\r"), ', ', $recipients);
   $recipients = str_replace(',', ', ', $recipients);
   $recipients = str_replace(',  ', ', ', $recipients);
+  
+  if(variable_get('forward_bcc_recipients', 0)) {
+    // Bcc the recipients instead of allowing their email
+    // addresses to be seen by all other recipients
+    $headers .= "Bcc: ".$recipients."\n";
 
-  forward_mail($recipients,$subject,$body,$headers);
+    forward_mail($edit['yemail'],$subject,$body,$headers);
+  }
+  else {
+    forward_mail($recipients,$subject,$body,$headers);
+  }
   // insert record into db to record nid, type and timestamp of send
   db_query("INSERT INTO {forward_log} (nid, type, timestamp) VALUES ('%d', '%s', %d)", $nid, "SENT", time());
   variable_set('forward_total', variable_get('forward_total', 0) +1);
