From 87c16498ca4d93db7ed69f9738182f7b88c33070 Mon Sep 17 00:00:00 2001 From: Kamel Khelifa Date: Fri, 18 Oct 2024 14:26:04 +0200 Subject: [PATCH] FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function --- htdocs/core/class/CMailFile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index db8b30ed2497a..34b7c2757e53f 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -687,7 +687,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;