noroman/check-email

This package is abandoned and no longer maintained. No replacement package was suggested.

Проверка email на существование

v0.0.1 2017-07-27 20:12 UTC

This package is auto-updated.

Last update: 2020-01-28 20:03:07 UTC


README

require_once __DIR__ . '/vendor/autoload.php';
use CheckEmail\CheckEmail;

$domainsExcluded = include __DIR__ . '/domainsExcluded.php';
$domainsTemporary = include __DIR__ . '/domainsTemporary.php';

$email = 'info@ya.ru';
$ce = new CheckEmail($email);
$ce->addDomainTemporary($domainsTemporary)->addDomainExcluded($domainsExcluded);
if ($ce->check()) {
    echo $email . ' exists';
} else {
    echo $email . ' not exists';
}

With debug logs

require_once __DIR__ . '/vendor/autoload.php';
use CheckEmail\CheckEmail;

$domainsExcluded = include __DIR__ . '/domainsExcluded.php';
$domainsTemporary = include __DIR__ . '/domainsTemporary.php';

$email = 'info@ya.ru';
$ce = new CheckEmail($email);
$ce->addDomainTemporary($domainsTemporary)->addDomainExcluded($domainsExcluded);
$ce->setDebug();
if ($ce->check()) {
    echo $email . ' exists';
} else {
    echo $email . ' not exists<br>';
    print_r($ce->getLogs());
}