pcf/disposable-email

Simple lib to verify is present mail come from disposable or temporary email address domain.

v1.1.0 2018-06-13 22:47 UTC

This package is not auto-updated.

Last update: 2024-06-08 18:59:38 UTC


README

GitHub version SensioLabsInsight

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

Domain repository date: 09.11.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 = 'paw.radzikowski@gmail.com';
$domain = trim(strstr($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.