Download the PHP package khanhicetea/fast-email-validator without Composer
On this page you can find all versions of the php package khanhicetea/fast-email-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download khanhicetea/fast-email-validator
More information about khanhicetea/fast-email-validator
Files in khanhicetea/fast-email-validator
Package fast-email-validator
Short Description A fast email validation library for PHP 7+
License MIT
Informations about the package fast-email-validator
Fast email validation library for PHP 7+
Inspired by daveearley's Email-Validation-Tool
The aim of this library is to offer a more detailed email validation report than simply checking if an email is the valid format, and also to make it possible to easily add custom validations.
Currently this tool checks the following:
Validation | Description |
---|---|
MX records | Checks if the email's domain has valid MX records |
Valid format | Validates e-mail addresses against the syntax in RFC 822, with the exceptions that comments and whitespace folding and dotless domain names are not supported (as it uses PHP's filter_var(). |
Email Host | Checks if the email's host (e.g gmail.com) is reachable |
Role/Business Email^ | Checks if the email is a role/business based email (e.g [email protected]). |
Disposable email provider^ | Checks if the email is a disposable email (e.g [email protected]). |
Free email provider^ | Checks if the email is a free email (e.g [email protected]). |
^ Data used for these checks can be found here
Why is it fast ?
Because we compile the text database to real PHP object, and use isset
function to check if a key existed.
Installation
Usage
Quick Start
Expected output:
FAQ
Is this validation accurate?
No, none of these tests are 100% accurate. As with any email validation there will always be false positives & negatives. The only way to guarantee an email is valid is to send an email and solicit a response. However, this library is still useful for detecting disposable emails etc., and also acts as a good first line of defence.