Skip to content

pradzikowski/DisposableEmail

 
 

Repository files navigation

Disposable email domains filter

GitHub version SensioLabsInsight

Our domain repositories come from repository licensed by Public Domain License(CC0 1.0).

Domain repository date: 04.04.2017

This repository is contributed by MIT License but files blocklist.conf and trustlist.conf are contributed by Public Domain License(CC0 1.0).

Basic Usage

<?php

require 'vendor/autoload.php';

use PCF\DisposableEmail\ListedVerifier;
use PCF\DisposableEmail\SimpleDomainCollection;
use PCF\DisposableEmail\Resource\AbstractResourceList;

$collection = new SimpleDomainCollection();
$collection->setBlockedList(AbstractResourceList::getList('block'));
$collection->setTrustedList(AbstractResourceList::getList('trust'));
$collection->setKnownList([
    //Add domains that you know, if you want
]);

$verifier = new ListedVerifier($collection);

$mail = '[email protected]';
list($localPart, $domain) = explode('@', $mail);

$status = $verifier->verifyDomain($domain); //It should return ListedVerifier::DOMAIN_UNKNOWN

#Versions

Version of this composer lib looks like 1.0.201707401 which contains Major version. Minor version. Year, day of the year and commit version. It should help with mail repository versioning.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%