✉️ E-Mail Address Validator for PHP
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
$emailCheck = EmailCheck::isValid("email@example.com"); // true
Example 2: (check for example-domain)
$emailCheck = EmailCheck::isValid("firstname.lastname@example.org", 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("email@example.com", false, false, true); // false
- Composer is a prerequisite for running the tests.
- The tests can be executed by running this command from the root directory:
For professional support please contact me.
- Thanks to GitHub (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
- Thanks to IntelliJ as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
- Thanks to Travis CI for being the most awesome, easiest continous integration tool out there!
- Thanks to StyleCI for the simple but powerfull code style check.
- Thanks to PHPStan && Psalm for relly great Static analysis tools and for discover bugs in the code!