PHPackages                             ryanj93/php-email-address-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. ryanj93/php-email-address-validator

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

ryanj93/php-email-address-validator
===================================

A simple tool that allows you to validate and check for e-mail address existence.

1.1.2(8y ago)12502GPL-3.0-or-laterPHPPHP &gt;=7.0

Since Feb 19Pushed 8y ago2 watchersCompare

[ Source](https://github.com/RyanJ93/php-email-address-validator)[ Packagist](https://packagist.org/packages/ryanj93/php-email-address-validator)[ Docs](https://github.com/RyanJ93/php-email-address-validator#readme)[ RSS](/packages/ryanj93-php-email-address-validator/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

E-mail validator (PHP edition)
==============================

[](#e-mail-validator-php-edition)

A very simple library that allows you to validate an e-mail address, check if it exists through online connection and check if the provider is a disposable one or not.

E-mail validation
=================

[](#e-mail-validation)

String validation:

`PHPEmailAddressValidator::validateString($email);`

Complete validation:

`PHPEmailAddressValidator::validate($email);`

The complete validation will check address syntax first, after that will check for provider existence through DNS resolution and then will check if the given e-mail address exists.

E-mail provider check
=====================

[](#e-mail-provider-check)

Before using these methods you should set up dictionaries as following:

`PHPEmailAddressValidator::setWhiteListDatabasePath('whitelist.txt');``PHPEmailAddressValidator::setBlackListDatabasePath('blacklist.txt');``PHPEmailAddressValidator::setDisposableProvidersDatabasePath('disposable.txt');`

Check if the e-mail provider is accepted:

`PHPEmailAddressValidator::isTrustedProvider($email, $disposableAllowed, $strict);`

With accepted is meant that the provider is found within the given white list, if strict mode is not enabled, will be also checked if the provider is found within the black list, in this case will be returned "false". If the provider is checked using strict mode will be returned "true" only if it is found within the given white list. Both white list and black list must be plain text files and providers must be separated by a break line (\\n).

Check if the e-mail provider is disposable:

`PHPEmailAddressValidator::isDisposableProvider($disposable);`

This method will check if the provider is included in the given list containing the disposable providers, a list with most common disposable providers is shipped with this library (kindly offered by [@michenriksen](https://gist.github.com/michenriksen/8710649)). Disposable providers list must be plain text files and providers must be separated by a break line (\\n).

Are you looking for the Node.js version? Give a look [here](https://github.com/RyanJ93/email-address-validator).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Every ~4 days

Total

2

Last Release

2996d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18029b3320ad57be78062e5be0584dd20deb3fe5f6fbdfb2d723fafc5a3b8742?d=identicon)[ryanj93](/maintainers/ryanj93)

---

Tags

emailemail-validationphpphp-libraryphp7validatorvalidationsecurityemailvalidateutilities

### Embed Badge

![Health badge](/badges/ryanj93-php-email-address-validator/health.svg)

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

###  Alternatives

[egulias/email-validator

A library for validating emails against several RFCs

11.6k691.3M307](/packages/egulias-email-validator)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[kartik-v/yii2-validators

Enhanced Yii2 model validator components / utilities for Yii2 Framework

21137.9k](/packages/kartik-v-yii2-validators)[neverbounce/neverbounce-php

This package provides convenient methods to integrate the NeverBounce API into your project.

241.1M3](/packages/neverbounce-neverbounce-php)[martian/spammailchecker

A laravel package that protect users from entering non-existing/spam email addresses.

422.0k](/packages/martian-spammailchecker)[kouz/laravel-mailgun-email-validation

Laravel email validation that uses the Mailgun API for a three-step validation check.

11141.0k1](/packages/kouz-laravel-mailgun-email-validation)

PHPackages © 2026

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