EmailValidator\Validator::hasMx PHP Метод

hasMx() публичный Метод

Test email address for MX records
public hasMx ( string $email ) : boolean | null
$email string Address
Результат boolean | null
    public function hasMx($email)
    {
        if (!$this->isEmail($email)) {
            return null;
        }
        $hostname = $this->hostnameFromEmail($email);
        if ($hostname) {
            return checkdnsrr($hostname, 'MX');
        }
        return null;
    }