PHPackages                             kalimeromk/email-check - 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. kalimeromk/email-check

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

kalimeromk/email-check
======================

An advanced PHP library for email validation with DNS checks and typo suggestions.

v1.2.0(7mo ago)22361MITPHPPHP &gt;=8.1

Since Sep 19Pushed 7mo agoCompare

[ Source](https://github.com/KalimeroMK/email-check)[ Packagist](https://packagist.org/packages/kalimeromk/email-check)[ RSS](/packages/kalimeromk-email-check/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

 [![PHP Email Check Logo](./og-image.png)](./og-image.png)PHP Email Check 📧
=================

[](#php-email-check-)

[![Latest Stable Version](https://camo.githubusercontent.com/39a5f7f5b561d08909b78c7fd2d90e9e2b39e38d8be4c03c2616a594cf12dafa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b616c696d65726f6d6b2f656d61696c2d636865636b2e737667)](https://packagist.org/packages/kalimeromk/email-check)[![License](https://camo.githubusercontent.com/49ecfbdc0179df141b071f3ae383960372e444cfc73edf50cd87d962a6931b12/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b616c696d65726f6d6b2f656d61696c2d636865636b2e737667)](https://packagist.org/packages/kalimeromk/email-check/)

A lightweight PHP library for advanced email address validation. It performs multi-layered checks, including syntax, domain validity (DNS), disposable service detection, and more.

📋 Table of Contents
-------------------

[](#-table-of-contents)

- [Key Features](#-key-features)
- [Installation](#-installation)
- [System Requirements](#-system-requirements)
- [Quick Start](#-quick-start)
- [Basic Usage](#basic-usage)
- [Advanced Features](#advanced-features)
    - [Pattern Filtering](#pattern-filtering)
    - [Disposable Email Detection](#disposable-email-detection)
    - [DNS Cache Configuration](#dns-cache-configuration)
    - [Mass Email Validation](#mass-email-validation)
    - [Domain Suggestions](#domain-suggestions)
- [Configuration](#configuration)
- [Testing](#testing)
- [API Reference](#api-reference)
- [Contributing](#contributing)
- [License](#license)

✨ Key Features
--------------

[](#-key-features)

- ✅ **Format Check:** Validates the basic `user@domain.com` syntax using PHP's filter\_var and advanced validation
- 🌐 **Domain Check:** Verifies the domain by checking for valid `MX` and `A` DNS records
- 🔍 **Advanced Validation:** Comprehensive email format validation with length checks and forbidden character detection
- ⚡ **DNS Caching:** Built-in caching for DNS queries to improve performance
- 💡 **Typo Correction Suggestions:** Offers "Did you mean?" suggestions for common typos in domain names
- 🚫 **Disposable Email Detection:** Blocks known disposable/temporary email services with auto-updating lists from multiple sources
- 📧 **SMTP Validation:** Optional real-time SMTP validation to verify mailbox existence (disabled by default)
- 🔧 **Configurable:** Customizable DNS servers, timeouts, and validation options
- 📦 **Batch Processing:** Validate multiple emails at once
- 🧪 **Comprehensive Testing:** 150+ tests with 500+ assertions covering all functionality
- 🚀 **Mass Validation:** Parallel processing for millions of emails with optimized performance

⚠️ Important Notice &amp; Limitations
-------------------------------------

[](#️-important-notice--limitations)

> **Please Note:** This package performs a detailed technical analysis of an email address. However, it **cannot 100% guarantee** that a specific mailbox actually exists or is active. The only definitive way to verify this is by sending an email with a confirmation link.

📦 Installation
--------------

[](#-installation)

Install the package easily via Composer.

```
composer require kalimeromk/email-check
```

⚙️ System Requirements
----------------------

[](#️-system-requirements)

### Minimum Requirements

[](#minimum-requirements)

- **PHP:** 8.1 or higher
- **Memory:** 256MB RAM
- **CPU:** 2 cores
- **Extensions:** `ext-json`, `ext-mbstring`

### Recommended for Mass Validation

[](#recommended-for-mass-validation)

- **PHP:** 8.4 or higher
- **Memory:** 128GB RAM (for 9M+ emails)
- **CPU:** 40+ cores with hyperthreading (80 threads)
- **Storage:** RAID 10 SSD for optimal I/O performance
- **Extensions:** `ext-pcntl` (for parallel processing)

🚀 Quick Start
-------------

[](#-quick-start)

```
