szepeviktor/unique-email-address

v0.3.0 2023-02-08 11:45 UTC

This package is auto-updated.

Last update: 2024-12-23 10:06:28 UTC


README

Build Status Latest Version on Packagist

Normalizes an email address. It removes tags, separators like +something and . in Gmail.

  • extendable
  • 100% flexible configuration
  • tells whether a valid email address belongs to the configured domains
  • normalizes an address
  • compares two addresses

Inspired by https://github.com/imliam/php-unique-gmail-address ✔️

Installation

composer require szepeviktor/unique-email-address

Usage

$gmail = new Gmail();
$address = 'firstname.LASTname+label@gmail.com';
$gmail->isLocal($address); // true
$gmail->normalize($address); // 'firstnamelastname@gmail.com'