Skip to content

Commit

Permalink
FIX Add warning when setup is strange
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 21, 2019
1 parent 4f34a8b commit f0f0b98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions htdocs/admin/mails.php
Expand Up @@ -526,11 +526,17 @@ function initfields()
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';

// Disable
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_MAILS").'</td><td>'.yn($conf->global->MAIN_DISABLE_ALL_MAILS).'</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_MAILS").'</td><td>'.yn($conf->global->MAIN_DISABLE_ALL_MAILS);
if (! empty($conf->global->MAIN_DISABLE_ALL_MAILS)) print img_warning($langs->trans("Disabled"));
print '</td></tr>';

// Force e-mail recipient
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_FORCE_SENDTO").'</td><td>'.$conf->global->MAIN_MAIL_FORCE_SENDTO;
if (! empty($conf->global->MAIN_MAIL_FORCE_SENDTO) && ! isValidEmail($conf->global->MAIN_MAIL_FORCE_SENDTO)) print img_warning($langs->trans("ErrorBadEMail"));
if (! empty($conf->global->MAIN_MAIL_FORCE_SENDTO))
{
if (! isValidEmail($conf->global->MAIN_MAIL_FORCE_SENDTO)) print img_warning($langs->trans("ErrorBadEMail"));
else print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue"));
}
print '</td></tr>';

//Add user to select destinaries list
Expand Down
3 changes: 2 additions & 1 deletion htdocs/langs/en_US/admin.lang
Expand Up @@ -1921,4 +1921,5 @@ UrlForIFTTT=URL endpoint for IFTTT
YouWillFindItOnYourIFTTTAccount=You will find it on your IFTTT account
EndPointFor=End point for %s : %s
DeleteEmailCollector=Delete email collector
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value

0 comments on commit f0f0b98

Please sign in to comment.