diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 3445a7fb905..66be484047e 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -1074,7 +1074,11 @@ if ($action == 'edit') { if ($dnstype == 'DMARC') { $domain = '_dmarc.'.$domain; } - $dnsinfo = dns_get_record($domain, DNS_TXT); + $authns = (!getDolGlobalString('MAIN_MAIL_OVERRIDE_AUTHORITATIVE_DNS') ? array() : explode(',', getDolGlobalString('MAIN_MAIL_OVERRIDE_AUTHORITATIVE_DNS'))); // eg 8.8.8.8, x.x.x.x + $dnsinfo = @dns_get_record($domain, DNS_TXT, $authns); + if ($dnsinfo === false) { + $text .= ($text ? '
' : '').$langs->trans("WarningDNSServerNotAvailable"); + } } if (!empty($dnsinfo) && is_array($dnsinfo)) { foreach ($dnsinfo as $info) {