Index: messaging_phpmailer.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/messaging/messaging_phpmailer/Attic/messaging_phpmailer.module,v
retrieving revision 1.1.2.10.2.13.2.5
diff -a -u -u -p -r1.1.2.10.2.13.2.5 messaging_phpmailer.module
--- messaging_phpmailer.module	11 Nov 2009 18:07:24 -0000	1.1.2.10.2.13.2.5
+++ messaging_phpmailer.module	28 Jan 2010 01:54:39 -0000
@@ -77,7 +77,13 @@ function messaging_phpmailer_settings_fo
       '#type' => 'checkbox',
       '#default_value' => variable_get('messaging_phpmailer_attach', 0),
       '#description' => t('If enabled, attachments will be included with outgoing messages.')
-  );  
+  );
+  $form['messaging_phpmailer_bcc'] = array(
+      '#title' => t('Send all messages via BCC'),
+      '#type' => 'checkbox',
+      '#default_value' => variable_get('messaging_phpmailer_bcc', 0),
+      '#description' => t('If enabled, all messages will be sent as BCCs and will have no "To:" address. ')
+  );
   $form['messaging_phpmailer_debug'] = array(
       '#title' => t('Debug mode'),
       '#type' => 'radios',
@@ -190,7 +196,13 @@ function messaging_phpmailer_drupal_mail
   }
   $mail->From = !empty($from['email']) ? $from['email'] : $message['headers']['From'];
   $mail->FromName = !empty($from['name']) ? $from['name'] : '';
-  $mail->AddAddress($message['to']);
+
+  if (variable_get('messaging_phpmailer_bcc', 0)) {
+    $mail->AddBCC($message['to']);
+  }
+  else {
+    $mail->AddAddress($message['to']);
+  }
 
   if(!empty($message['headers']['Message-ID'])) {
     $mail->MessageID = $message['headers']['Message-ID'];
