This library will normalize email addresses for cases when different email addresses all point towards a single email account.
For example [email protected]
points to [email protected]
.
This is useful for cases such as when you want to limit a single user using a single email account to signup using different email addresses.
composer require gabrola/email-normalizer
<?php
use Gabrola\EmailNormalizer\EmailNormalizer;
use Gabrola\EmailNormalizer\EmailRules;
$emailNormalizer = new EmailNormalizer(new EmailRules());
$normalizedEmail = $emailNormalizer->normalize('[email protected]');
echo $normalizedEmail; //Returns [email protected]
- Plus Tags:
[email protected]
normalizes as[email protected]
- Hyphen Tags:
[email protected]
normalizes as[email protected]
- Dots:
[email protected]
normalizes as[email protected]
- Subdomain Addressing:
[email protected]
normalizes as[email protected]
- Aliases:
[email protected]
normalizes as[email protected]
- Gmail
- Outlook
- Yahoo
- Fastmail
- Apple iCloud
- Yandex
- Mail.ru
- ProtonMail