Fixed error reporting in mail send method
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 13 Feb 2011 09:00:38 +0000 (09:00 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 13 Feb 2011 09:00:38 +0000 (09:00 +0000)
reporting/includes/class.mail.inc

index e5e0e67bcbb88ecf5c119f13a0830d95a09a0442..778815534f01e83144c488434b8af765e21832a0 100644 (file)
@@ -151,9 +151,11 @@ class email
         }
                        $this->body .= "--".$this->boundary."--\n";
 
+               $ret = 0;
         foreach($this->to as $mail)
         {
-                       $ret = mail($mail, $this->subject, $this->body, $this->header);
+                       if (mail($mail, $this->subject, $this->body, $this->header))
+                               $ret++;
         }
         return $ret;
     }