devnix / mailcheck
Provide email suggestions based on multiple dictionaries
Installs: 8 436
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 3
Open Issues: 2
Requires
- php: >=7.1
- egulias/email-validator: ^2.1
- utopia-php/domains: ^1.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/phpstan: ^0.12.78
- symfony/phpunit-bridge: ^5.2
This package is auto-updated.
Last update: 2024-11-23 18:49:51 UTC
README
Validate and suggest emails for your email inputs
Disclaimer
This library uses by default a public data source to suggest various know email providers.
As this list is pretty much a work in progress you may be missing some domains, so please feel free to open an issue or a pull request to improve it.
Installation
composer require devnix/mailcheck
Usage
You just need to initialize an instance to get a shiny suggestion service!
use Devnix\Mailcheck\Mailcheck; $mailcheck = new Mailcheck();
Then you can ask for an array of suggestions, ordered by Levenshtein distance...
$mailcheck->suggest('example@gmil.com');
array:5 [
0 => "example@gmail.com"
1 => "example@gmx.com"
2 => "example@mail.com"
3 => "example@email.com"
4 => "example@ymail.com"
]
...or just the first coincidence
$mailcheck->suggestOne('example@gmil.com');
"example@gmail.com"
Contributing
You can help by reporting bugs, submitting pull requests, providing feedback about your needs or bad suggestions.
You can execute all the tests by rugging composer test
. We use tools like
PHPStan,
PHPUnit, and
PHP CS Fixer. We like to follow
the Symfony Coding Standards.