PHPackages                             miovisman/normemail - 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. miovisman/normemail

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

miovisman/normemail
===================

Normalization of email for bans, for request cache to SFS or for checking the uniqueness of new users.

1.0.0(6y ago)1401MITPHPPHP &gt;=5.6.0

Since Jan 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/MioVisman/NormEmail)[ Packagist](https://packagist.org/packages/miovisman/normemail)[ Docs](https://github.com/MioVisman/NormEmail)[ RSS](/packages/miovisman-normemail/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (1)

NormEmail
=========

[](#normemail)

[![MIT licensed](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

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

[](#installation)

```
composer require miovisman/normemail

```

normalize() method
------------------

[](#normalize-method)

```
$nEmail = new MioVisman\NormEmail\NormEmail();

$email = $nEmail->normalize($email);
```

- ### Method does not validate email address

    [](#method-does-not-validate-email-address)
- ### Do not use normalized email to send emails

    [](#do-not-use-normalized-email-to-send-emails)
- Use a normalized email to check the ban or uniqueness of the email of a new user. Check on the normalized emails ;)
- The domain is lowercase (and in Punycode)
- The local part is lowercase unless otherwise specified
- The local part after the "+" is truncated (for Yahoo domains - after the "-")

```
// some string
                                      =>
ExampLe                               => example
ExampLe@                              => example@
exaMple.COM                           => example.com
.example.com                          => .example.com
@examPLe.com                          => example.com
"examPLe.com                          => "example.com
"USER+++NAME@EXAMpLE.com              => "USER+++NAME@example.com
googlemail.com                        => gmail.com
pm.me                                 => protonmail.com
yandex.tj                             => yandex.ru
ya.ru                                 => yandex.ru
.ya.ru                                => .yandex.ru

// Unicode
ПОЛЬЗОВАТЕЛЬ@домен.РУ                 => пользователь@xn--d1acufc.xn--p1ag
пользователь+тег@домен.ру             => пользователь@xn--d1acufc.xn--p1ag

// Gmail
User.namE+tag@gmail.com               => username@gmail.com
u.sern.ame+tag+tag+tag@googlemail.com => username@gmail.com

// Protonmail
u_s.e-rname+tag@pm.me                 => username@protonmail.com
user-name@protonmail.ch               => username@protonmail.com

// Yahoo (.com, .ae, .at, ...)
username-tag@yahoo.com                => username@yahoo.com
user+name-tag@yahoo.fr                => user+name@yahoo.fr

// Yandex (13 domains)
user.name+tag@яндекс.рф               => user-name@yandex.ru
user-name@yandex.com                  => user-name@yandex.ru
username@ya.ru                        => username@yandex.ru

```

License
-------

[](#license)

This project is under MIT license. Please see the [license file](LICENSE) for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

2320d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15eedc8758791b5c39f771bdba9ae16e470fc4d8b9981fd2a23e49af4ee0b110?d=identicon)[MioVisman](/maintainers/MioVisman)

---

Top Contributors

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

---

Tags

bancanonical-emailemailnormalizationemailnormalizationbancanonical email

### Embed Badge

![Health badge](/badges/miovisman-normemail/health.svg)

```
[![Health](https://phpackages.com/badges/miovisman-normemail/health.svg)](https://phpackages.com/packages/miovisman-normemail)
```

###  Alternatives

[egulias/email-validator

A library for validating emails against several RFCs

11.6k691.3M307](/packages/egulias-email-validator)[sendgrid/sendgrid

This library allows you to quickly and easily send emails through Twilio SendGrid using PHP.

1.5k47.5M164](/packages/sendgrid-sendgrid)[pelago/emogrifier

Converts CSS styles into inline style attributes in your HTML code

94944.1M110](/packages/pelago-emogrifier)[zbateson/mail-mime-parser

MIME email message parser

54149.2M79](/packages/zbateson-mail-mime-parser)[soundasleep/html2text

A PHP script to convert HTML into a plain text format

48519.5M75](/packages/soundasleep-html2text)[opcodesio/mail-parser

Parse emails without the mailparse extension

226.8M8](/packages/opcodesio-mail-parser)

PHPackages © 2026

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