DataObjects/Core_watch.php
[Pman.Core] / Mailer.php
index 5e58227..4fdebf5 100644 (file)
@@ -276,7 +276,7 @@ class Pman_Core_Mailer {
         $mailOptions = PEAR::getStaticProperty('Mail','options');
         //print_R($mailOptions);exit;
         $mail = Mail::factory("SMTP",$mailOptions);
-        $headers['Date'] = date('r'); 
+        $email['headers']['Date'] = date('r'); 
         if (PEAR::isError($mail)) {
              $pg->addEvent("COREMAILER-FAIL",  false, "mail factory failed"); 
       
@@ -294,8 +294,8 @@ class Pman_Core_Mailer {
         error_reporting($oe);
         if ($ret === true) { 
             $pg->addEvent("COREMAILER-SENT",  false,
-                    'To: ' . implode(', ', $rcpts) .
-                    'Subject '  . $headers['Subject']
+                'To: ' .  ( is_array($rcpts) ? implode(', ', $rcpts) : $rcpts ) .
+                'Subject: '  . @$email['headers']['Subject']
             ); 
         }