From 53a76dc01f2da1bfee0480fb6e4d38c55fa3561f Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 23 Oct 2020 16:39:45 +0200 Subject: [PATCH] fix mail error message --- htdocs/core/actions_sendmails.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index e23d2ce01a9..51484fcce24 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -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 .= '
Feature is disabled by option MAIN_DISABLE_ALL_MAILS'; + } else { + $mesg .= '
Unkown Error, please refers to your administrator'; + } } $mesg .= '';