Skip to content

Check if a email address is acceptable so you can avoid fake/invalid users on your database.

License

Notifications You must be signed in to change notification settings

MASNathan/email-validator

Repository files navigation

Email Validator

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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

Installation

You can install the package via composer:

composer require masnathan/email-validator

Usage

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
// ]

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Check if a email address is acceptable so you can avoid fake/invalid users on your database.

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages