2017 © Pedro Peláez
 

library email-checker

Throwaway email detection library

image

mattketmo/email-checker

Throwaway email detection library

  • Monday, July 23, 2018
  • by MattKetmo
  • Repository
  • 12 Watchers
  • 129 Stars
  • 142,779 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 32 Forks
  • 8 Open issues
  • 16 Versions
  • 12 % Grown

The README.md

EmailChecker

Build status... Code quality... Downloads Packagist License MIT, (*1)

PHP library to check if an email comes from a disposable email provider., (*2)

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

Installation

Via Composer:, (*4)

composer require mattketmo/email-checker

Usage

Basic use of EmailChecker with built-in throwaway email list:, (*5)

<?php

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

use EmailChecker\EmailChecker;

$checker = new EmailChecker();

$checker->isValid('foo@bar.org');     // true
$checker->isValid('foo@yopmail.com'); // false

Or using a custom adapter:, (*6)

<?php

use EmailChecker\EmailChecker;
use EmailChecker\Adapter;

$checker = new EmailChecker(new Adapter\ArrayAdapter(array(
    'foo.org',
    'baz.net'
)));

$checker->isValid('foo@bar.org'); // true
$checker->isValid('foo@baz.net'); // false

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

Integration with Symfony2

This library also provides a constraint validation for your Symfony2 project:, (*8)

<?php

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

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

Integration with Laravel 5

To integrate this library with your Laravel 5.x project add the following line to the providers key within your config/app.php file:, (*9)

EmailChecker\Laravel\EmailCheckerServiceProvider::class

If you would like to use the EmailChecker facade, you must also add the following line to the aliases key within your config/app.php file:, (*10)

'EmailChecker' => EmailChecker\Laravel\EmailCheckerFacade::class

You can then use the library within your project like so:, (*11)

<?php

class MyClass
{
    public function foo()
    {
        // Facade Access
        EmailChecker::isValid('address@domain.com');

        // Container Access
        $checker = app()->make('email.checker');
        $checker->isValid('address@domain.com');
    }

    public function getValidator(array $data)
    {
        // Not thow away validator
        return Validator::make($data, [
             'email' => 'required|email|not_throw_away'
        ]);
    }
}

List of some disposable emails database

  • http://10minutemail.com
  • http://spamdecoy.net
  • http://temp-mail.org
  • http://torvpn.com/temporaryemail.html
  • http://www.bloggingwv.com/big-list-of-disposable-temporary-email-services/
  • http://www.fakemailgenerator.com/
  • http://www.warriorforum.com/main-internet-marketing-discussion-forum/147524-list-temporary-email-services-you-may-want-block-your-autoresponder-little-rant.html
  • http://xenforo.com/community/threads/ban-temporary-email-addresses.5461/

License

EmailChecker is released under the MIT License. See the bundled LICENSE file for details., (*12)

The Versions

23/07 2018

dev-master

9999999-dev

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

email check disposable throwaway

11/10 2017

v1.5.4

1.5.4.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

email check disposable throwaway

31/07 2017

v1.5.3

1.5.3.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

email check disposable throwaway

12/08 2016

v1.5.2

1.5.2.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

email check disposable throwaway

21/06 2016

v1.5.1

1.5.1.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

email check disposable throwaway

25/01 2016

v1.5.0

1.5.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

email check disposable throwaway

06/01 2016

dev-benchmarks

dev-benchmarks

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

email check disposable throwaway

31/12 2015

v1.4.0

1.4.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php ^5.3.3 || ^7.0

 

The Development Requires

email check disposable throwaway

27/09 2015

v1.3.0

1.3.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

email check disposable throwaway

27/08 2015

v1.2.0

1.2.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

email check disposable throwaway

26/08 2015

v1.1.0

1.1.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

email check disposable throwaway

13/09 2014

v1.0

1.0.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

email check disposable throwaway

09/07 2014

v0.4

0.4.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

email check disposable throwaway

25/11 2013

v0.3

0.3.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

email check disposable throwaway

01/04 2013

v0.2

0.2.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

email check disposable throwaway

29/03 2013

v0.1

0.1.0.0

Throwaway email detection library

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

email check disposable throwaway