Merge pull request #15119 from FHenry/12.0_fix_mailerrormessage

fix mail error message
This commit is contained in:
Laurent Destailleur 2020-10-25 14:50:23 +01:00 committed by GitHub
commit b80d135fcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -491,7 +491,12 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST
}
else
{
$mesg .= 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS';
$mesg .= $langs->transnoentities('ErrorFailedToSendMail', dol_escape_htmltag($from), dol_escape_htmltag($sendto));;
if (!empty($conf->global->MAIN_DISABLE_ALL_MAILS)) {
$mesg .= '<br>Feature is disabled by option MAIN_DISABLE_ALL_MAILS';
} else {
$mesg .= '<br>Unkown Error, please refers to your administrator';
}
}
$mesg .= '</div>';