PHP code example of lennyrouanet / email-validity-checker
1. Go to this page and download the library: Download lennyrouanet/email-validity-checker library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lennyrouanet / email-validity-checker example snippets
use Phant\EmailValidityChecker\EmailValidityChecker;
use Phant\EmailValidityChecker\Exception\{
EmailFormatIsNotValid,
EmailDomainFormatIsNotValid,
EmailDomainIsTrashMailBoxService,
EmailDomainWithoutMxServer,
};
$email = '[email protected]';
try {
$EmailValidityChecker = new EmailValidityChecker($email);
} catch (EmailFormatIsNotValid | EmailDomainFormatIsNotValid | EmailDomainIsTrashMailBoxService | EmailDomainWithoutMxServer $e) {
// E-mail domain is not valid
}