voku / email-check
email-check (syntax, dns, trash, ...) library
Fund package maintenance!
voku
Patreon
Tidelift
www.paypal.me/moelleken
Installs: 3 349 839
Dependents: 4
Suggesters: 0
Security: 0
Stars: 48
Watchers: 5
Forks: 13
Open Issues: 8
Requires
- php: >=7.0.0
- symfony/polyfill-intl-idn: ~1.10
Requires (Dev)
- fzaninotto/faker: ~1.7
- phpunit/phpunit: ~6.0 || ~7.0
Suggests
- ext-intl: Use Intl for best performance
- dev-master
- 3.1.0
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.0
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.1.2
- 0.1.1
- 0.1.0
- dev-renovate/phpunit-phpunit-11.x
- dev-dependabot/add-v2-config-file
- dev-whitesource/configure
- dev-analysis-8md2nD
- dev-analysis-qBAddV
- dev-scrutinizer-patch-1
- dev-analysis-qB93mX
This package is auto-updated.
Last update: 2024-12-03 04:20:46 UTC
README
✉️ E-Mail Address Validator for PHP
Warning
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!
Installation
The recommended installation way is through Composer.
$ composer require voku/email-check
Usage:
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
Unit Test:
- Composer is a prerequisite for running the tests.
composer install
- The tests can be executed by running this command from the root directory:
./vendor/bin/phpunit
Support
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.
Thanks
- 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!