PHP code example of noroman / check-email

1. Go to this page and download the library: Download noroman/check-email library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

noroman / check-email example snippets



use CheckEmail\CheckEmail;

$domainsExcluded = Temporary.php';

$email = '[email protected]';
$ce = new CheckEmail($email);
$ce->addDomainTemporary($domainsTemporary)->addDomainExcluded($domainsExcluded);
if ($ce->check()) {
    echo $email . ' exists';
} else {
    echo $email . ' not exists';
}


use CheckEmail\CheckEmail;

$domainsExcluded = Temporary.php';

$email = '[email protected]';
$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());
}