选择语言 :

 Core_Valid::email_domain

Validate the domain of an email address by checking if the domain has a valid MX record.

boolean Core_Valid::email_domain( string $email )
link
http://php.net/checkdnsrr

参数列表

参数 类型 描述 默认值
$email string Email address
返回值
  • boolean
File: ./core/classes/valid.class.php
public static function email_domain($email)
{
    // Check if the email domain has a valid MX record
    return (bool)checkdnsrr(preg_replace('/^[^@]++@/', '', $email), 'MX');
}