You are here

protected function EmailValidator::checkDNS in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php \Egulias\EmailValidator\EmailValidator::checkDNS()
1 call to EmailValidator::checkDNS()
EmailValidator::isValid in vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php

File

vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php, line 145

Class

EmailValidator
EmailValidator

Namespace

Egulias\EmailValidator

Code

protected function checkDNS() {
  $checked = true;
  $result = checkdnsrr(trim($this->parser
    ->getParsedDomainPart()), 'MX');
  if (!$result) {
    $this->warnings[] = self::DNSWARN_NO_RECORD;
    $checked = false;
    $this
      ->addTLDWarnings();
  }
  return $checked;
}