diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index f575fb5a302..ab8695e871b 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -1020,26 +1020,27 @@ if ($action == 'edit') {
}
if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail') {
+ // mthode php mail
if (getDolGlobalString('MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD')) { // Not defined by default. Depend on platform.
// List of string to add in SPF if the setup use the mail method. Example 'include:sendgrid.net include:spf.mydomain.com'
- $text .= ($text ? '
' : '').$langs->trans("WarningPHPMailSPFDMARC", getDolGlobalString('MAIN_EXTERNAL_MAIL_SPF_STRING_TO_ADD'));
+ $text .= ($text ? '
' : '').$langs->trans("WarningPHPMailSPFDMARC");
} else {
// MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is list of IPs where email is sent from. Example: '1.2.3.4, [aaaa:bbbb:cccc:dddd]'.
if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) {
- // List of IP show as record to add in SPF if we use the mail method
- $text .= ($text ? '
' : '').$langs->trans("WarningPHPMailSPFDMARC", getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
+ // List of IP shown as record to add in SPF if we use the mail method
+ $text .= ($text ? '
' : '').$langs->trans("WarningPHPMailSPFDMARC");
}
}
} else {
- // smtps or swiftmail
- if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) { // Not defined by default. Depend on platform.
- // List of IP show as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]'
- // TODO Add a key to allow to show the IP/name of server detected dynamically
- $text .= ($text ? '
' : '').$langs->trans("WarningPHPMail2", getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
- }
+ // method smtps or swiftmail
if (getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD')) { // Should be required only if you have preset the Dolibarr to use your own SMTP and you want to warn users to update their domain name to match your SMTP server.
// List of string to add in SPF if we use the smtp method. Example 'include:spf.mydomain.com'
- $text .= ($text ? '
' : '').$langs->trans("WarningPHPMailSPFDMARC", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD'));
+ $text .= ($text ? '
' : '').$langs->trans("WarningPHPMailSPF", getDolGlobalString('MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD'));
+ }
+ if (getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS')) { // Not defined by default. Depend on platform.
+ // List of IP shown as record to add as allowed IP if we use the smtp method. Value is '1.2.3.4, [aaaa:bbbb:cccc:dddd]'
+ // TODO Add a key to allow to show the IP/name of server detected dynamically
+ $text .= ($text ? '
' : '').$langs->trans("WarningPHPMail2", getDolGlobalString('MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS'));
}
}
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 155e57538d4..7b08eb85291 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -521,7 +521,8 @@ WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to se
WarningPHPMailD=It is therefore recommended to change the sending method of e-mails to the value "SMTP".
WarningPHPMailDbis=If you really want to keep the default "PHP" method to send emails, just ignore this warning, or remove it by %sclicking here%s.
WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of the mail user agent (MUA) for your ERP CRM application: %s.
-WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must add the following IPs in the SPF record of the DNS of the domain: %s.
+WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s.
+WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method.
SPFAndDMARCInformation=SPF and DMARC DNS record for main email addresses
ActualMailDNSRecordFound=Actual %s record found (for email %s) : %s
ClickToShowDescription=Click to show description