Index: signup.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/signup/signup.module,v
retrieving revision 1.73
diff -u -F^f -r1.73 signup.module
--- signup.module	18 Aug 2006 08:20:56 -0000	1.73
+++ signup.module	9 Dec 2006 13:59:50 -0000
@@ -60,7 +60,6 @@ function signup_cron() {
     //grab each event, construct the email header and subject, and query the signup log to pull all users who are
     //signed up for this event
     $from = variable_get('site_mail', 'noadmin@noadmin.com');
-    $header = "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from";
     while ($event = db_fetch_object($result)) {
       $subject = t('Event reminder: %event', array('%event' => $event->title));
       $signups = db_query("SELECT u.name, u.mail, s_l.anon_mail FROM {signup_log} s_l INNER JOIN {users} u ON u.uid = s_l.uid
@@ -75,7 +74,7 @@ function signup_cron() {
         $trans = array("%event" => $event->title, "%time" => _event_date(variable_get('signup_date_string', 'D, M jS, g:i A'),
         $event->event_start, $offset), "%username" => $signup->name, "%useremail" => $mail_address);
         $message = strtr($event->reminder_email, $trans);
-        user_mail($mail_address, $subject, $message, $header);
+        drupal_mail('signup_reminder_mail', $mail_address, $subject, $message, $from);
         watchdog('signup', t('Reminder for %event sent to %useremail.', array('%event' => l($event->title, 'node/' . $event->nid), '%useremail' => $mail_address)));
       }
 
@@ -801,20 +800,19 @@ function signup_sign_up_user($signup_for
 
     //if a confirmation is to be sent, compose the mail message, translate the string substitutions, and send it
     if ($event->send_confirmation && $user_mail) {
-      $header = "From: $from\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from";
       $subject = t('Signup confirmation for event: %event', array('%event' => $node->title));
       $message = strtr($event->confirmation_email, $trans);
-      user_mail($user_mail, $subject, $message, $header);
+      drupal_mail('signup_confirmation_mail', $user_mail, $subject, $message, $from);
     }
 
     //if a forwarding email is to be sent, compose the mail message, translate the string substitutions, and send it
     if ($event->forwarding_email) {
-      $header = "From: " . t('New Event Signup') . "<$from>\nReply-to: $from\nX-Mailer: Drupal\nReturn-path: $from\nErrors-to: $from";
+      $header = array('From' => t('New Event Signup') . "<$from>");
       $subject = t('Signup confirmation for event: %title', array('%title' => $node->title));
       $message = t('The following information was submitted as a signup for %title', array('%title' => $node->title)) .
       "\n\r" . t('Date/Time: %time', array('%time'=>$starttime)) . ":\n\r\n\r\n\r" . t('username:') . $user->name .
       "\n\r" . t('email:') . $user_mail . "\n\r\n\r" . $signup_data;
-      user_mail($event->forwarding_email, $subject, $message, $header);
+      drupal_mail('signup_forwarding_mail', $event->forwarding_email, $subject, $message, $from, $header);
     }
     drupal_set_message(t('Signup to %title confirmed.', array('%title' => l($node->title, "node/$node->nid"))) . $confirmation_email . $reminder_email);
   } else {
