Download the PHP package sunaoka/email-normalizer-php without Composer

On this page you can find all versions of the php package sunaoka/email-normalizer-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package email-normalizer-php

email-normalizer-php

email-normalizer-php is a PHP port of gmr/email-normalize.

It normalizes email addresses by applying mailbox provider-specific rules such as plus addressing, Gmail dot handling, and Fastmail subdomain aliases. It detects providers from MX records through PHP's native DNS functions, or from a static domain map when DNS lookups are skipped.

This package is for canonicalizing email addresses. It is not an email validator and does not check whether a mailbox exists.

Requirements

Installation

Basic Usage

normalize() creates a temporary Normalizer instance. Reuse Normalizer directly when normalizing many addresses or when cache options matter.

Empty input, including strings that become empty after trimming, throws InvalidArgumentException.

Skipping DNS Lookups

Use skipDns: true when DNS resolution is not desired. In this mode, the package does not call DNS, detects well-known mailbox providers from a static domain map, and returns an empty MX record list.

Reusing a Normalizer

Create a Normalizer instance when normalizing multiple addresses. The MX cache is shared at the package level and respects the configured cache limit and failure caching options.

Constructor options:

Result Object

normalize() and Normalizer::normalize() return Sunaoka\EmailNormalizer\Result.

Fields:

An empty mxRecords list means DNS was skipped or MX lookup failed.

Supported Providers

Normalization Rules

Examples:

DNS and Caching

MX records are resolved with dns_get_record($domain, DNS_MX). Records are normalized to lowercase host names and sorted by priority, then host.

The cache is shared by all Normalizer instances. When the cache reaches cacheLimit, the entry with the lowest hit count and oldest access time is removed.

Failed MX lookups return an empty list. When cacheFailures is enabled, failures are cached for failureTtl seconds.

Development

composer analyse runs PHPStan at max level with bleeding edge rules enabled.

License

BSD-3-Clause.

This project is based on the behavior of gmr/email-normalize.


All versions of email-normalizer-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
jeremykendall/php-domain-parser Version ^6.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sunaoka/email-normalizer-php contains the following files

Loading the files please wait ...