Rust

canonicals

Module

Canonical forms of addresses per mail provider.

Contents

use utopia_emails::Canonical;
Rust
pub struct Canonical

The canonical form of an address: its local part and domain with a provider's aliases removed.

Also implements Display.
use utopia_emails::Fastmail;
Rust
pub struct Fastmail

Fastmail: keeps the local part and uses fastmail.com.

use utopia_emails::Generic;
Rust
pub struct Generic

The fallback for any domain: only lower-cases the local part. Its canonical domain is empty and it lists no domains.

use utopia_emails::Gmail;
Rust
pub struct Gmail

Gmail: drops +tags and all dots; googlemail.com is gmail.com.

use utopia_emails::Icloud;
Rust
pub struct Icloud

iCloud, me.com and mac.com: drops +tags, keeps dots, and uses icloud.com.

use utopia_emails::Outlook;
Rust
pub struct Outlook

Outlook, Hotmail, Live, MSN and Passport: drops +tags, keeps dots, and uses outlook.com.

use utopia_emails::Protonmail;
Rust
pub struct Protonmail

Proton Mail: drops +tags, keeps dots and the domain (each Proton domain is a separate address).

use utopia_emails::Walla;
Rust
pub struct Walla

Walla: keeps the local part; walla.com is walla.co.il.

use utopia_emails::Yahoo;
Rust
pub struct Yahoo

Yahoo, Ymail and Rocketmail: keeps the local part (a -keyword is a separate disposable address, not an alias) and uses yahoo.com.

use utopia_emails::Yandex;
Rust
pub struct Yandex

Yandex: keeps the local part and uses yandex.ru. Not in PROVIDERS.

use utopia_emails::Provider;
Rust
pub trait Provider: Send + Sync

A mail provider's aliasing rules. Implement it to add a provider; crate::Email::canonical_with takes any set of them.