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)05.9k—5%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 1mo 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 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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

1219d 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

[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[voku/email-check

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

504.1M4](/packages/voku-email-check)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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