Throwaway email detection library

Installs: 3 325

Dependents: 0

Stars: 23

Watchers: 4

Forks: 3

Open Issues: 1

Language: PHP

v1.0 2014-09-13 16:20 UTC


Build status... Code quality... License MIT Packagist

PHP library to check if an email comes from a disposable email provider.

To detect invalid emails, it provides a built-in database of 550+ disposable email providers, but you can also use your own data.

Note: this library is inspired from FGRibreau/mailchecker, except it only focuses on PHP (and integration with Symfony).


Via Composer:

composer require "mattketmo/email-checker:~1.0"


Basic use of EmailChecker with built-in throwaway email list:


require __DIR__.'/vendor/autoload.php';

use EmailChecker\EmailChecker;

$checker = new EmailChecker();

$checker->isValid('');     // true
$checker->isValid(''); // false

Or using another adapter:


use EmailChecker\EmailChecker;
use EmailChecker\Adapter;

$checker = new EmailChecker(new Adapter\ArrayAdapter(array(

$checker->isValid(''); // true
$checker->isValid(''); // false

You can build your own adapter (to use another database) simply by implementing the AdapterInterface.

Integration with Symfony2

This library also provides a constraint validation for your Symfony2 project:

use EmailChecker\Constraints as EmailCheckerAssert;
use Symfony\Component\Validator\Constraints as Assert;

class User
     * @Assert\NotBlank
     * @EmailCheckerAssert\NotThrowawayEmail
    protected $email;


EmailChecker is released under the MIT License. See the bundled LICENSE file for details.