This is an easy way to check if a email address is acceptable so you can avoid fake/invalid users on your database.
What this API does is check if the email address is correctly formatted, is from a disposable or temporary service and the domain is reachable. This way you can filter out spam and one-shot accounts decreasing the rate of fake or invalid accounts on your database.
Request your API key here
You can install the package via composer:
composer require masnathan/email-validator
use MASNathan\EmailValidator\EmailValidator;
$emailValidator = new EmailValidator('email-validator8.p.rapidapi.com', 'super-secret-api-key');
$details = $emailValidator->check('[email protected]');
var_dump($details);
// array:5 [
// "email" => "[email protected]"
// "valid" => true
// "disposable" => false
// "mx_records" => true
// "exists" => null
// ]
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.