From 5c5d2cbefab36d744bc125c98011d88ea06adb0b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Feb 2018 23:49:08 +0100 Subject: [PATCH] Fix smtp warning message --- htdocs/admin/mails.php | 15 ++++++++++++--- htdocs/langs/en_US/admin.lang | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index d482322a054..f6868eb7348 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -689,10 +689,19 @@ else print ''; - if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && ! in_array($action, array('testconnect', 'test', 'testhtml'))) + if (! in_array($action, array('testconnect', 'test', 'testhtml'))) { - $text = $langs->trans("WarningPHPMail"); - print info_admin($text); + $text = ''; + if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') + { + $text.= $langs->trans("WarningPHPMail"); + } + //$conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS='1.2.3.4'; + if (! empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS)) + { + $text.= ($text?'
':'').$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS); + } + if ($text) print info_admin($text); } // Run the test to connect diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2daa092c5db..30df45facd2 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -448,7 +448,8 @@ ModuleCompanyCodePanicum=Return an empty accounting code. ModuleCompanyCodeDigitaria=Accounting code depends on third party code. The code is composed of the character "C" in the first position followed by the first 5 characters of the third party code. Use3StepsApproval=By default, Purchase Orders need to be created and approved by 2 different users (one step/user to create and one step/user to approve. Note that if user has both permission to create and approve, one step/user will be enough). You can ask with this option to introduce a third step/user approval, if amount is higher than a dedicated value (so 3 steps will be necessary: 1=validation, 2=first approval and 3=second approval if amount is enough).
Set this to empty if one approval (2 steps) is enough, set it to a very low value (0.1) if a second approval (3 steps) is always required. UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than... -WarningPHPMail=WARNING: Some email providers (like Yahoo) does not allow you to send an email from another server than the Yahoo server if the email address used as a sender is your Yahoo email (like myemail@yahoo.com, myemail@yahoo.fr, ...). Your current setup use the server of the application to send email, so some recipients (the one compatible with the restrictive DMARC protocol), will ask Yahoo if they can accept your email and Yahoo will respond "no" because the server is not a server owned by Yahoo, so few of your sent Emails may not be accepted.
If your Email provider (like Yahoo) has this restriction, you must change Email setup to choose the other method "SMTP server" and enter the SMTP server and credentials provided by your Email provider (ask your EMail provider to get SMTP credentials for your account). +WarningPHPMail=WARNING: It is often better to setup outgoing email to use the email server of your provider than the default setup. Some email providers (like Yahoo) does not allow you to send an email from another server than their own server. Your current setup use the server of the application to send email and not the server of your email provider, so some recipients (the one compatible with the restrictive DMARC protocol), will ask your email provider if they can accept your email and some email providers (like Yahoo) may respond "no" because the server is not a server of them, so few of your sent Emails may not be accepted.
If your Email provider (like Yahoo) has this restriction, you must change Email setup to choose the other method "SMTP server" and enter the SMTP server and credentials provided by your Email provider (ask your EMail provider to get SMTP credentials for your account). +WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of your ERP CRM application: %s. ClickToShowDescription=Click to show description DependsOn=This module need the module(s) RequiredBy=This module is required by module(s)