https://github.com/voku/email-check
:envelope: E-Mail Address Validator (syntax, dns, trash, typo)
https://github.com/voku/email-check
email email-validation hacktoberfest php
Last synced: 6 months ago
JSON representation
:envelope: E-Mail Address Validator (syntax, dns, trash, typo)
- Host: GitHub
- URL: https://github.com/voku/email-check
- Owner: voku
- License: mit
- Created: 2015-07-23T09:31:09.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-09T10:23:46.000Z (over 1 year ago)
- Last Synced: 2024-10-29T22:50:26.000Z (11 months ago)
- Topics: email, email-validation, hacktoberfest, php
- Language: PHP
- Homepage:
- Size: 207 KB
- Stars: 48
- Watchers: 5
- Forks: 13
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/voku/email-check)
[](http://codecov.io/github/voku/email-check?branch=master)
[](https://www.codacy.com/app/voku/email-check)
[](https://packagist.org/packages/voku/email-check)
[](https://packagist.org/packages/voku/email-check)
[](https://packagist.org/packages/voku/email-check)
[](https://www.paypal.me/moelleken)
[](https://www.patreon.com/voku)# :envelope: 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](https://getcomposer.org).
```bash
$ composer require voku/email-check
```### Usage:
Example 1:
$emailCheck = EmailCheck::isValid("lars@moelleken.org");
// trueExample 2: (check for example-domain)
$emailCheck = EmailCheck::isValid("lars@example.com", true);
// falseExample 3: (check for typo in domain)
$emailCheck = EmailCheck::isValid("lars@-tonline.de", false, true);
// falseExample 4: (check for temporary-domain)
$emailCheck = EmailCheck::isValid("lars@30minutemail.com", false, false, true);
// false### Unit Test:
1) [Composer](https://getcomposer.org) is a prerequisite for running the tests.
```
composer install
```2) The tests can be executed by running this command from the root directory:
```bash
./vendor/bin/phpunit
```### Support
For support and donations please visit [Github](https://github.com/voku/email-check/) | [Issues](https://github.com/voku/email-check/issues) | [PayPal](https://paypal.me/moelleken) | [Patreon](https://www.patreon.com/voku).
For status updates and release announcements please visit [Releases](https://github.com/voku/email-check/releases) | [Twitter](https://twitter.com/suckup_de) | [Patreon](https://www.patreon.com/voku/posts).
For professional support please contact [me](https://about.me/voku).
### Thanks
- Thanks to [GitHub](https://github.com) (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
- Thanks to [IntelliJ](https://www.jetbrains.com) as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
- Thanks to [Travis CI](https://travis-ci.com/) for being the most awesome, easiest continous integration tool out there!
- Thanks to [StyleCI](https://styleci.io/) for the simple but powerfull code style check.
- Thanks to [PHPStan](https://github.com/phpstan/phpstan) && [Psalm](https://github.com/vimeo/psalm) for relly great Static analysis tools and for discover bugs in the code!