fix: When sendmail failed it return false, result is KO, need to say it to user (#26631)

* fix: When sendmail failed it return false, need to be tested as is

* fix: When sendmail failed it return false, so >=0 do not trigger error

* fix: When sendmail failed it return false, so >=0 do not trigger error

* Update CMailFile.class.php

* Update actions_sendmails.inc.php

* Update actions_sendmails.inc.php

* Update CMailFile.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
HENRY Florian 2023-11-17 12:01:03 +01:00 committed by GitHub
parent bc70788ace
commit 102356d2c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -370,7 +370,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
$action = 'presend';
} else {
$result = $mailfile->sendfile();
if ($result >= 0) {
if ($result) {
// Initialisation of datas of object to call trigger
if (is_object($object)) {
if (empty($actiontypecode)) {

View file

@ -1194,7 +1194,6 @@ class CMailFile
}
error_reporting($errorlevel); // Reactive niveau erreur origine
return $res;
}