PHPackages                             khanhicetea/fast-email-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. khanhicetea/fast-email-validator

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

khanhicetea/fast-email-validator
================================

A fast email validation library for PHP 7+

1.0.0(8y ago)59282[1 issues](https://github.com/khanhicetea/fast-email-validator/issues)MITPHPPHP ^7.0

Since Jul 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/khanhicetea/fast-email-validator)[ Packagist](https://packagist.org/packages/khanhicetea/fast-email-validator)[ RSS](/packages/khanhicetea-fast-email-validator/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

**Fast email validation library for PHP 7+**

[![Build Status](https://camo.githubusercontent.com/bdb1c94399b15dc858a6e5934efd13bf529fba610ad01acf37bf2c4cc7ac3c02/68747470733a2f2f7472617669732d63692e6f72672f6b68616e686963657465612f666173742d656d61696c2d76616c696461746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/khanhicetea/fast-email-validator)

Inspired by [daveearley's Email-Validation-Tool](https://github.com/daveearley/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:

ValidationDescriptionMX recordsChecks if the email's domain has valid MX recordsValid formatValidates 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 HostChecks if the email's host (e.g gmail.com) is reachableRole/Business Email^Checks if the email is a role/business based email (e.g ).Disposable email provider^Checks if the email is a disposable email (e.g ).Free email provider^Checks if the email is a free email (e.g ).^ **Data used for these checks can be found [here](https://github.com/khanhicetea/fast-email-validator/tree/master/src/database)**

Why is it fast ?
================

[](#why-is-it-fast-)

Because we compile [the text database](https://github.com/khanhicetea/fast-email-validator/tree/master/src/database) to real PHP object, and use `isset` function to check if a key existed.

Installation
============

[](#installation)

```
composer require khanhicetea/fast-email-validator
```

Usage
=====

[](#usage)

Quick Start
-----------

[](#quick-start)

```
// Include the composer autoloader
require __DIR__ . '/vendor/autoload.php';

use FastEmailValidator\EmailAddress;
use FastEmailValidator\EmailValidatorProvider;
use FastEmailValidator\EmailValidator;

$fastEmailValidator = new EmailValidator();

$provider = new EmailValidatorProvider();
$provider->registerValidator(new ValidFormatValidator());
$provider->registerValidator(new DisposableEmailValidator());
$provider->registerValidator(new EmailHostValidator());
$provider->registerValidator(new FreeEmailServiceValidator());
$provider->registerValidator(new MxRecordsValidator());
$provider->registerValidator(new RoleBasedEmailValidator());

$fastEmailValidator->registerEmailValidatorProvider($provider);

$result = $fastEmailValidator->validate(new EmailAddress('hi@khanhicetea.com'));

echo(json_encode($result));
```

Expected output:

```
{
  "valid_format": true,
  "disposable_email_provider": false,
  "valid_host": true,
  "free_email_provider": false,
  "valid_mx_records": true,
  "role_or_business_email": true
}
```

FAQ
===

[](#faq)

### Is this validation accurate?

[](#is-this-validation-accurate)

No, none of these tests are 100% accurate. As with any email validation there will always be false positives &amp; 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.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3263d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7813bb37bdbd56acf5eb3e1fdcbe1f31c34fcb16134a1538ee7d7b6b9d2825af?d=identicon)[khanhicetea](/maintainers/khanhicetea)

---

Top Contributors

[![khanhicetea](https://avatars.githubusercontent.com/u/4528223?v=4)](https://github.com/khanhicetea "khanhicetea (5 commits)")

---

Tags

emailmailphpvalidatoremailvalidate-emailemail validationemail-verificationdisposable email checkfast email validation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/khanhicetea-fast-email-validator/health.svg)

```
[![Health](https://phpackages.com/badges/khanhicetea-fast-email-validator/health.svg)](https://phpackages.com/packages/khanhicetea-fast-email-validator)
```

###  Alternatives

[daveearley/daves-email-validation-tool

An easy to use, accurate-ish &amp; extensible email validation library for PHP 7+

279335.8k2](/packages/daveearley-daves-email-validation-tool)[egulias/email-validator

A library for validating emails against several RFCs

11.6k719.7M402](/packages/egulias-email-validator)[sendgrid/sendgrid

This library allows you to quickly and easily send emails through Twilio SendGrid using PHP.

1.5k49.8M183](/packages/sendgrid-sendgrid)[pelago/emogrifier

Converts CSS styles into inline style attributes in your HTML code

94745.9M132](/packages/pelago-emogrifier)[zbateson/mail-mime-parser

MIME email message parser

54551.9M86](/packages/zbateson-mail-mime-parser)[soundasleep/html2text

A PHP script to convert HTML into a plain text format

48520.6M85](/packages/soundasleep-html2text)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
