PHP Class EmailValidator\Validator

Datei anzeigen Open project: nojacko/email-validator

Public Methods

Method Description
hasMx ( string $email ) : boolean | null Test email address for MX records
isDisposable ( string $email ) : boolean | null Detected disposable email domains
isEmail ( string $email ) : boolean Valid email Due complexity of email validation (non-latin chars, ", .
isExample ( string $email ) : boolean | null Detected example email addresses.
isRole ( string $email ) : boolean | null Detected role based email addresses
isSendable ( string $email ) : boolean Validate an email address using isEmail, isExample and hasMx.
isValid ( string $email ) : boolean Validate an email address using ALL the functions of this library.

Private Methods

Method Description
hostnameFromEmail ( string $email ) : string | null Get the hostname form an email address
userFromEmail ( string $email ) : string | null Get the user form an email address

Method Details

hasMx() public method

Test email address for MX records
public hasMx ( string $email ) : boolean | null
$email string Address
return boolean | null

isDisposable() public method

Detected disposable email domains
public isDisposable ( string $email ) : boolean | null
$email string Address
return boolean | null

isEmail() public method

..), this is VERY simple. Rule: [email protected] Note: webmaster@localhost won't be valid
public isEmail ( string $email ) : boolean
$email string Address
return boolean

isExample() public method

As defined in http://tools.ietf.org/html/rfc2606
public isExample ( string $email ) : boolean | null
$email string Address
return boolean | null

isRole() public method

Detected role based email addresses
public isRole ( string $email ) : boolean | null
$email string Address
return boolean | null

isSendable() public method

Validate an email address using isEmail, isExample and hasMx.
public isSendable ( string $email ) : boolean
$email string Address
return boolean

isValid() public method

Validate an email address using ALL the functions of this library.
public isValid ( string $email ) : boolean
$email string Address
return boolean