DataObjects/Core_watch.php
[Pman.Core] / Mailer.php
index 4b3c14e..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,10 +294,10 @@ 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']
+            ); 
+        }  
        
         return $ret;
     }