/**
* Config file that a user/developer can insert quickemailverficationservice api key
*/
return [
'apiKey' => ''
];
print_r(EmailValidator::verify('[email protected]')->isValid());
// returns Array ( [0] => [1] => Could not get MX records for domain )
print_r(EmailValidator::verify('[email protected]')->isValid());
// returns Array ( [0] => 1 [1] => SMTP server accepted email address )
var_dump( EmailValidator::verify('[email protected]')->isValid()[0]);
// returns bool(true)
var_dump( EmailValidator::verify('[email protected]')->isValid()[0]);
// returns bool(false)
if( EmailValidator::verify('[email protected]')->isValid()[0] ){
......
}
// returns a true/false if the email address is valid or not
/**
* Returns true or false if the email address uses a disposable domain
* @return boolean
*/
EmailValidator::verify('[email protected]')->isDisposable()
/**
* Returns true or false if the API request was successful
* @return boolean
*/
EmailValidator::verify('[email protected]')->apiRequestStatus()
/**
* Get the domain of the provided email address
* @return string
*/
EmailValidator::verify('[email protected]')->getDomainName()
/**
* Get the local part of an email address
* Example: [email protected] returns kkkkk
* @return string
*/
EmailValidator::verify('[email protected]')->getUser()
/**
* Returns true if the domain appears to accept all emails delivered to that domain
* @return boolean
*/
EmailValidator::verify('[email protected]')->acceptEmailsDeliveredToDomain()