forked from Wavyzz/dolibarr
Update mails.php
This commit is contained in:
committed by
GitHub
parent
8ce70aac5d
commit
3c69fb0ea3
@@ -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 ? '<br><br>' : '').$langs->trans("ActualMailSPFRecordFound", $info['txt']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user