From 3c69fb0ea3f866bf6b3449aed13bffcf866dd00c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Nov 2021 02:35:15 +0100 Subject: [PATCH] Update mails.php --- htdocs/admin/mails.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index acfafcf9370..90036b752b0 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -850,13 +850,13 @@ if ($action == 'edit') { } $companyemail = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL'); $dnsinfo = false; - if (!empty($companyemail)) { + if (!empty($companyemail) && function_exists('dns_get_record')) { $domain = array_pop(explode('@', $companyemail)); $dnsinfo = dns_get_record($domain, DNS_TXT); } if (!empty($dnsinfo) && is_array($dnsinfo)) { foreach ($dnsinfo as $info) { - if (strpos($info['txt'], 'v=spf1') !== false) { + if (strpos($info['txt'], 'v=spf') !== false) { $text .= ($text ? '

' : '').$langs->trans("ActualMailSPFRecordFound", $info['txt']); } }