use-email-address 0.1.0

Email address and mailbox primitives for RustUse
Documentation
  • Coverage
  • 100%
    51 out of 51 items documented1 out of 39 items with examples
  • Size
  • Source code size: 23.16 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-email
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-email-address

Email address and mailbox primitives for RustUse.

Experimental

use-email-address is experimental while use-email remains below 0.3.0.

Example

use use_email_address::{AddressValidationMode, EmailAddress, Mailbox};

let address = EmailAddress::new_with_mode("jane@example.com", AddressValidationMode::Practical)?;
let mailbox = Mailbox::new(Some("Jane Doe"), address.to_string())?;

assert_eq!(address.local_part().as_str(), "jane");
assert_eq!(address.domain_part().as_str(), "example.com");
assert_eq!(mailbox.to_string(), "\"Jane Doe\" <jane@example.com>");
# Ok::<(), use_email_address::AddressValidationError>(())

Scope

  • Address, local-part, domain, display-name, mailbox, mailbox-list, and address-group wrappers.
  • Practical, strict ASCII, and internationalized validation modes.
  • Conservative formatting and parsing helpers.

Non-goals

  • Complete RFC 5322 or RFC 6532 parsing.
  • DNS lookup or deliverability checks.
  • Provider-specific address policy.

License

Licensed under either Apache-2.0 or MIT.