PHPackages                             masroore/mailcheck-php - 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. masroore/mailcheck-php

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

masroore/mailcheck-php
======================

Reduce misspelled email addresses in your PHP apps.

0.1.5(3y ago)07.7k—5.8%MITPHPPHP ^8.1 || ^8.2

Since Jan 12Pushed 3y ago2 watchersCompare

[ Source](https://github.com/masroore/mailcheck-php)[ Packagist](https://packagist.org/packages/masroore/mailcheck-php)[ Docs](https://github.com/masroore/mailcheck-php)[ RSS](/packages/masroore-mailcheck-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (10)Versions (7)Used By (0)

mailcheck-php
=============

[](#mailcheck-php)

The PHP library that suggests a right domain when your users misspell it in an email address. See the original at .

When your user types in "", Mailcheck will suggest "".

Mailcheck will offer up suggestions for second and top level domains too. For example, when a user types in "", "hotmail.com" will be suggested. Similarly, if only the second level domain is misspelled, it will be corrected independently of the top level domain.

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

[](#installation)

> **Requires [PHP 8.1+](https://php.net/releases/)**

You can install the package via composer:

```
composer require masroore/mailcheck
```

Usage
-----

[](#usage)

```
> $mailcheck = new Kaiju\Mailcheck\Mailcheck();
> print_r($mailcheck->suggest("user@gmil.con"));

# Kaiju\Mailcheck\EmailSuggestion Object
# (
#     [fullAddress] => user@gmail.com
#     [originalAddress] => user@gmil.con
#     [account] => user
#     [domain] => gmail.com
# )
```

Returns `null` if no suggestion:

```
> $mailcheck->suggest("user@hotmail.com")
# => null
```

Domains
-------

[](#domains)

Mailcheck has inbuilt defaults if the `domains`, `secondLevelDomains` or `topLevelDomains` options aren't provided. We still recommend supplying your own domains based on the distribution of your users.

#### Adding your own Domains

[](#adding-your-own-domains)

You can replace Mailcheck's default domain/TLD suggestions by supplying replacements:

```
$mailcheck->setDomains(['customdomain.com', 'anotherdomain.net']); // replaces existing domains
$mailcheck->setSecondLevelDomains(['domain', 'yetanotherdomain']); // replaces existing SLDs
$mailcheck->setTopLevelDomains(['com.au', 'ru']);  // replaces existing TLDs
```

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

[](#contributing)

Let's make Mailcheck awesome. We're on the lookout for maintainers and [contributors](https://github.com/masroore/mailcheck/contributors).

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Maintainers
-----------

[](#maintainers)

- [Dr. Masroor Ehsan](https://github.com/masroore), Author.

License
-------

[](#license)

Licensed under the MIT License.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Every ~1 days

Total

6

Last Release

1266d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/200963?v=4)[Masroor Ehsan](/maintainers/masroore)[@masroore](https://github.com/masroore)

---

Top Contributors

[![masroore](https://avatars.githubusercontent.com/u/200963?v=4)](https://github.com/masroore "masroore (17 commits)")

---

Tags

mail-checkmailcheckemail typodomain typo

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/masroore-mailcheck-php/health.svg)

```
[![Health](https://phpackages.com/badges/masroore-mailcheck-php/health.svg)](https://phpackages.com/packages/masroore-mailcheck-php)
```

###  Alternatives

[voku/email-check

email-check (syntax, dns, trash, ...) library

514.2M6](/packages/voku-email-check)[maize-tech/laravel-email-domain-rule

Laravel Email Domain Rule

612.0k](/packages/maize-tech-laravel-email-domain-rule)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.5k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

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