voku/email-check
Validates email addresses in PHP with multiple checks (syntax, DNS/MX, disposable domains and more) to reduce bounces and fake signups. Lightweight library with simple API, suitable for signup forms, user imports, and email hygiene workflows.
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("lars@moelleken.org");
// true
Example 2: (check for example-domain)
$emailCheck = EmailCheck::isValid("lars@example.com", true);
// false
Example 3: (check for typo in domain)
$emailCheck = EmailCheck::isValid("lars@-tonline.de", false, true);
// false
Example 4: (check for temporary-domain)
$emailCheck = EmailCheck::isValid("lars@30minutemail.com", false, false, true);
// false
Example 5: (disable punycode conversion)
$emailCheck = EmailCheck::isValid("Lars@Mölleken.ORG", false, false, false, false, false);
// 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.
How can I help you explore Laravel packages today?