Throwaway email detection library

Installs: 5 417

Dependents: 0

Stars: 33

Watchers: 4

Forks: 5

Open Issues: 1

Language: PHP

v1.3.0 2015-09-27 12:46 UTC


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

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

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


Via Composer:

composer require mattketmo/email-checker


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 a custom 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;

List of some disposable emails database


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