PHPackages                             thenetbotz/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. thenetbotz/email-validator

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

thenetbotz/email-validator
==========================

Laravel package to validate emails using syntax, MX, disposable-domain and SMTP handshake checks.

v1.0.0(1mo ago)02↓88.9%MITPHPPHP ^8.1

Since Jun 2Pushed 1mo agoCompare

[ Source](https://github.com/The-NetBotz/email-validator)[ Packagist](https://packagist.org/packages/thenetbotz/email-validator)[ RSS](/packages/thenetbotz-email-validator/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

Thenetbotz Email Validator
==========================

[](#thenetbotz-email-validator)

A Laravel package that validates email addresses through four progressively stricter layers: **syntax → disposable-domain check → MX lookup → SMTP RCPT-TO handshake** (with catch-all detection).

No paid API. Works on PHP 8.1+ and Laravel 10/11/12.

Install
-------

[](#install)

```
composer require thenetbotz/email-validator
```

Publish the config and disposable-domain list (optional):

```
php artisan vendor:publish --tag=email-validator-config
php artisan vendor:publish --tag=email-validator-resources
```

Usage
-----

[](#usage)

### Facade

[](#facade)

```
use Thenetbotz\EmailValidator\Facades\EmailValidator;

$result = EmailValidator::validate('jane.doe@example.com');

$result->valid;   // bool
$result->reason;  // 'valid' | 'invalid_syntax' | 'no_mx_record' | 'disposable_domain' | 'smtp_rejected' | 'smtp_unreachable' | 'catch_all'
$result->checks;  // ['syntax' => true, 'mx' => true, 'disposable' => true, 'smtp' => true]
$result->message; // server response or null
```

### Dependency injection

[](#dependency-injection)

```
use Thenetbotz\EmailValidator\EmailValidator;

public function store(Request $r, EmailValidator $validator) {
    $result = $validator->validate($r->input('email'));
}
```

### As a validation rule

[](#as-a-validation-rule)

```
use Thenetbotz\EmailValidator\Rules\ValidEmail;

$request->validate([
    'email' => ['required', new ValidEmail()],
]);

// Reject catch-all domains too:
$request->validate([
    'email' => ['required', new ValidEmail(allowCatchAll: false)],
]);
```

### Batch CSV validation

[](#batch-csv-validation)

```
php artisan email:validate emails.csv --out=results.csv
php artisan email:validate emails.txt --skip-smtp
```

Configuration
-------------

[](#configuration)

`config/email-validator.php`:

```
'checks' => [
    'syntax'     => true,
    'mx'         => true,
    'disposable' => true,
    'smtp'       => true,
],

'smtp' => [
    'timeout'    => 10,
    'port'       => 25,
    'helo_host'  => env('EMAIL_VALIDATOR_HELO', 'localhost'),
    'from_email' => env('EMAIL_VALIDATOR_FROM', 'verify@example.com'),
],

'cache' => [
    'enabled' => true,
    'ttl'     => 86400,
],
```

Accuracy &amp; speed
--------------------

[](#accuracy--speed)

Layers enabledAccuracySpeed (sequential)Syntax only~50%100k+/secSyntax + MX~70%~5k/minSyntax + MX + Disposable~75%~5k/minAll layers (incl. SMTP)~85–95%~500–2,000/hour**Caveats:**

- Many ISPs and cloud providers block outbound port 25. Run from a server with port 25 open.
- Gmail/Outlook/Yahoo intentionally accept any address to prevent enumeration — SMTP can't disprove existence on them.
- Catch-all domains accept everything; the package flags these via `REASON_CATCH_ALL`.
- Aggressive probing can get your IP blacklisted. Cache results (enabled by default).

Testing
-------

[](#testing)

```
composer install
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

52d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/73303605?v=4)[Ahmad Hassan Qaiser](/maintainers/iAhmadHassan23)[@iAhmadHassan23](https://github.com/iAhmadHassan23)

---

Top Contributors

[![iAhmadHassan2](https://avatars.githubusercontent.com/u/183413527?v=4)](https://github.com/iAhmadHassan2 "iAhmadHassan2 (1 commits)")

---

Tags

laravelvalidatoremailsmtpverificationdisposableMX

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

728176.2k14](/packages/tallstackui-tallstackui)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)

PHPackages © 2026

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