lennyrouanet/email-validity-checker

This package is abandoned and no longer maintained. The author suggests using the phant/email-validity-checker package instead.

Check e-mail domain easily

2.0.0 2021-08-30 07:21 UTC

This package is auto-updated.

Last update: 2021-08-30 07:24:34 UTC


README

Requirments

PHP >= 8.0

Install

composer require phant/email-validity-checker

Use

use Phant\EmailValidityChecker\EmailValidityChecker;
use Phant\EmailValidityChecker\Exception\{
	EmailFormatIsNotValid,
	EmailDomainFormatIsNotValid,
	EmailDomainIsTrashMailBoxService,
	EmailDomainWithoutMxServer,
};

$email = 'john.doe@fake-box.com';

try {
	
	$EmailValidityChecker = new EmailValidityChecker($email);

} catch (EmailFormatIsNotValid | EmailDomainFormatIsNotValid | EmailDomainIsTrashMailBoxService | EmailDomainWithoutMxServer $e) {
	
	// E-mail domain is not valid
	
}