diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index e782e83f66270..29acff325b26b 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -755,7 +755,7 @@ public function sendfile() $this->error = "Error in hook maildao sendMail ".$reshook; dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); - return $reshook; + return false; } if ($reshook == 1) { // Hook replace standard code return true; @@ -1283,7 +1283,7 @@ public function sendfile() // Send mail method not correctly defined // -------------------------------------- - return 'Bad value for sendmode'; + $this->error = 'Bad value for sendmode'; } // Now we delete image files that were created dynamically to manage data inline files @@ -1300,7 +1300,7 @@ public function sendfile() $this->error = "Error in hook maildao sendMailAfter ".$reshook; dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR); - return $reshook; + return false; } } else { $this->error = 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS';