PHPackages                             masnathan/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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. masnathan/email-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

masnathan/email-validator
=========================

This is an easy way to check if a email address is acceptable so you can avoid fake/invalid users on your database.

v1.0.0(4y ago)3162[1 PRs](https://github.com/MASNathan/email-validator/pulls)MITPHPPHP ^7.4|^8.0CI failing

Since Aug 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/MASNathan/email-validator)[ Packagist](https://packagist.org/packages/masnathan/email-validator)[ Docs](https://github.com/masnathan/email-validator)[ GitHub Sponsors](https://github.com/MASNathan)[ RSS](/packages/masnathan-email-validator/feed)WikiDiscussions main Synced 6d ago

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

Email Validator
===============

[](#email-validator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a1dcfc03454aef6bfab14de63c5a2e5b8860d31c2483dbd986f8630e65965ab5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61736e617468616e2f656d61696c2d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masnathan/email-validator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/b284c23375d6ba286793f9c57b79228c9314fde710462d91ec281e96b8fa8b18/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d61736e617468616e2f656d61696c2d76616c696461746f722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/masnathan/email-validator/actions?query=workflow%3ATests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/0ef53ca02c3dc378c637896f30df3a29b6bfa0ce8c5723ac3309d9af695b4262/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d61736e617468616e2f656d61696c2d76616c696461746f722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/masnathan/email-validator/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/35502c4847e0ca305208eb5a6bdb7ae42a31c9fcf932b911e9e3082f734e3f6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61736e617468616e2f656d61696c2d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masnathan/email-validator)

This is an easy way to check if a email address is acceptable so you can avoid fake/invalid users on your database.

What this API does is check if the email address is correctly formatted, is from a disposable or temporary service and the domain is reachable. This way you can filter out spam and one-shot accounts decreasing the rate of fake or invalid accounts on your database.

Request your API key [here](https://rapidapi.com/MASNathan/api/email-validator8/)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require masnathan/email-validator
```

Usage
-----

[](#usage)

```
use MASNathan\EmailValidator\EmailValidator;

$emailValidator = new EmailValidator('email-validator8.p.rapidapi.com', 'super-secret-api-key');

$details = $emailValidator->check('some-email@gmail.com');

var_dump($details);
// array:5 [
//   "email" => "some-email@gmail.com"
//   "valid" => true
//   "disposable" => false
//   "mx_records" => true
//   "exists" => null
// ]
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [André Filipe](https://github.com/masnathan)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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

1726d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2139464?v=4)[André Filipe](/maintainers/MASNathan)[@MASNathan](https://github.com/MASNathan)

---

Top Contributors

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

---

Tags

email validatormasnathan

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[robertogallea/laravel-codicefiscale

Codice fiscale validation for php/laravel

58151.6k1](/packages/robertogallea-laravel-codicefiscale)[unicodeveloper/laravel-email-validator

Provides a Facade to help validate and verify email addresses

2332.5k](/packages/unicodeveloper-laravel-email-validator)[speelpenning/laravel-postcode-nl

A Laravel client using the Postcode.eu REST API for Dutch address verification.

1221.1k](/packages/speelpenning-laravel-postcode-nl)

PHPackages © 2026

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