Crates.io | norm-email |
lib.rs | norm-email |
version | 0.1.0 |
source | src |
created_at | 2021-10-15 15:13:00.55956 |
updated_at | 2021-10-15 15:13:00.55956 |
description | strip email provider defined behaviour from email addresses |
homepage | https://github.com/orhanbalci |
repository | https://github.com/orhanbalci/norm-email.git |
max_upload_size | |
id | 465531 |
size | 15,074 |
Email normalization for your services. This crate is ported from Python library email-normalize written by @gmr.
[dependencies]
norm-email = {git = "https://github.com/orhanbalci/norm-email"}
fn main() {
let normalizer = Normalizer::new();
let result = normalizer.normalize("orhan.balci@gmail.com").unwrap();
println!("{:#?}", result.mx_records);
println!("{}", result.mailbox_provider.unwrap());
println!("{}", result.normalized_address);
}
[
MxRecord {
priority: 30,
host: "alt3.gmail-smtp-in.l.google.com.",
},
MxRecord {
priority: 20,
host: "alt2.gmail-smtp-in.l.google.com.",
},
MxRecord {
priority: 5,
host: "gmail-smtp-in.l.google.com.",
},
MxRecord {
priority: 10,
host: "alt1.gmail-smtp-in.l.google.com.",
},
MxRecord {
priority: 40,
host: "alt4.gmail-smtp-in.l.google.com.",
},
]
GOOGLE
orhanbalci@gmail.com
Licensed under MIT License (LICENSE).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.