Process/Php7.php
[Pman.Core] / Mailer.php
index b0a6593..23fb875 100644 (file)
@@ -373,7 +373,10 @@ class Pman_Core_Mailer {
                 'Subject: '  . @$email['headers']['Subject']
             ); 
         }  else {
-            $pg->addEvent("COREMAILER-FAIL",  false, $ret->toString());
+            $pg->addEvent("COREMAILER-FAIL",  false,
+                "Sending to : " . ( is_array($rcpts) ? implode(', ', $rcpts) : $rcpts ) .
+                " Error: " . $ret->toString());
+
         }
         
         return $ret;
@@ -503,7 +506,7 @@ class Pman_Core_Mailer {
         @$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
         
         $body = $dom->getElementsByTagName('body');
-        if ($body->count()) {
+        if (!empty($body->length)) {
             $body->item(0)->setAttribute('class', $cls);
         } else {
             $body = $dom->createElement("body");