Skip to content

Email normalization: [email protected] => [email protected]. Will normalize emails to their canonical form for Google, Microsoft, FastMail, Yahoo and more.

License

Notifications You must be signed in to change notification settings

naile/canonical-emails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CanonicalEmails

Build status CanonicalEmails

A tiny .NET Core library for email normalization. Inspired by normailize

Installation

PM> Install-Package CanonicalEmails

Usage

var email = new MailAddress("[email protected]")
var normalized = Normalizer.Normalize(email) // => [email protected]
    
// or as extension
normalized = email.Normalize() // => [email protected]
    

Configuration

var settings = new NormalizerSettings
{
	RemoveDots = true, // Remove "." for applicable domains
	RemoveTags = true, // Remove tags (ex: '+' and '-') for applicable domains)
	LowerCase = true, // Lowercase
	NormalizeHost = true // googlemail.com => gmail.com)
}

Normalizer.Normalize(email, settings)
    
// or globally
Normalizer.ConfigureDefaults(settings);

Support for gmail, hotmail, live.com, outlook, yahoo, protonmail and a few more.

License

MIT

About

Email normalization: [email protected] => [email protected]. Will normalize emails to their canonical form for Google, Microsoft, FastMail, Yahoo and more.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages