diff -u -r1.2.2.3 mailman_manager.module
--- mailman_manager.module	18 Feb 2007 22:13:36 -0000	1.2.2.3
+++ mailman_manager.module	19 Feb 2007 19:50:13 -0000
@@ -449,14 +449,18 @@
   $command = "subscribe ".$password." ".$digest." address=".trim($mail);
   $headers = "";
   // If the adminaddress was given, use BCC
-  $headers .= "From: ". variable_get('site_mail', ini_get('sendmail_from')) ."\n";
+  // Eliminate to: and from: headers for use with drupal_mail
+  // $headers .= "From: ". variable_get('site_mail', ini_get('sendmail_from')) ."\n";
   if ( $adminaddress != "" ) {
-      $headers .= "Bcc: ".$adminaddress."\n";
+     $headers = array('Bcc: '.$adminaddress);
+  //    $headers .= "Bcc: ".$adminaddress."\n";
   } else {
   }
-  mail($commandaddress,'',$command,$headers);
+  // Test drupal_mail patch, commenting out use of php mail() function
+  // mail($commandaddress,'',$command,$headers);
+  $mailsuccess = drupal_mail ('mailman-manager', $commandaddress, '', $command, variable_get('site_mail', ini_get('sendmail_from')), $headers);
   $query = "UPDATE {mailman_users} SET lmail = '%s', lpass = '%s' WHERE uid = %d AND lid = %d";
-  if (db_query($query,$mail,$password,$uid,$lid)){
+  if (db_query($query,$mail,$password,$uid,$lid) && $mailsuccess){
     $watchdog = 'New subscription to list '.$lid.' for user '.$uid.' completed successfully.';
 	watchdog('mailman man', $watchdog, 'WATCHDOG_NOTICE', NULL);
   } else {
@@ -475,12 +479,17 @@
   $list = db_fetch_array($result);
   $commandaddress = $list[command];
   $adminaddress = $list[admin];
-  $headers = "From: ". variable_get('site_mail', ini_get('sendmail_from')) ."\n";
+  // If the adminaddress was given, use BCC
+  // Eliminate to: and from: headers for use with drupal_mail
+  // $headers = "From: ". variable_get('site_mail', ini_get('sendmail_from')) ."\n";
   if ( $adminaddress != "" )
-      $headers .= "Bcc: ".$adminaddress."\n";
+     $headers = array('Bcc: '.$adminaddress);
+  //   $headers .= "Bcc: ".$adminaddress."\n";
   $watchdog = 'Mail command sent to Mailman to: '. $commandaddress.' Command: '.$command;
   watchdog('mailman man', $watchdog, 'WATCHDOG_NOTICE', NULL);
-  mail($commandaddress,'',$command,$headers);
+  // Eliminate use of php mail() function in favor or drupal_mail function
+  // mail($commandaddress,'',$command,$headers);
+  drupal_mail ('mailman-manager', $commandaddress, '', $command, variable_get('site_mail', ini_get('sendmail_from')), $headers);
   return; 
 }