E-Mail Address Validator (syntax, dns, trash, typo)
MIT License
The best way to validate an e-mail address is still to send a duplicate opt-in-mail, when the user clicks on the link, it was a valid e-mail address!
The recommended installation way is through Composer.
$ composer require voku/email-check
Example 1:
$emailCheck = EmailCheck::isValid("[email protected]");
// true
Example 2: (check for example-domain)
$emailCheck = EmailCheck::isValid("[email protected]", true);
// false
Example 3: (check for typo in domain)
$emailCheck = EmailCheck::isValid("[email protected]", false, true);
// false
Example 4: (check for temporary-domain)
$emailCheck = EmailCheck::isValid("[email protected]", false, false, true);
// false
composer install
./vendor/bin/phpunit
For support and donations please visit Github | Issues | PayPal | Patreon.
For status updates and release announcements please visit Releases | Twitter | Patreon.
For professional support please contact me.