Fixed error reporting in mail send method
[fa-stable.git] / 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;
     }