Skip to main content

Crate use_email

Crate use_email 

Source
Expand description

§use-email

Feature-gated facade crate for RustUse email primitives.

§Experimental

use-email is experimental while the workspace remains below 0.3.0.

§Example

use use_email::address::Mailbox;
use use_email::message::EmailMessage;
use use_email::mailto::MailtoBuilder;

let mailbox = Mailbox::new(Some("Jane Doe"), "jane@example.com")?;
let message = EmailMessage::plain_text("Hello", "A short note.");
let uri = MailtoBuilder::new().to("jane@example.com")?.subject("Hello").build();

assert_eq!(mailbox.to_string(), "\"Jane Doe\" <jane@example.com>");
assert_eq!(message.subject(), Some("Hello"));
assert_eq!(uri.to_string(), "mailto:jane@example.com?subject=Hello");

§Scope

  • Address, header, message, envelope, message identity, MIME, mailto:, SMTP vocabulary, and authentication metadata modules.
  • Thin facade modules over focused crates.

§Non-goals

  • Sending, receiving, storing, or templating mail.
  • Provider SDKs or framework abstractions.
  • Network, DNS, TLS, or async runtime behavior.

§License

Licensed under either Apache-2.0 or MIT.

Modules§

address
Address and mailbox primitives.
auth
Email authentication metadata primitives.
envelope
SMTP envelope identity primitives.
header
Header name, value, field, and common header primitives.
id
Message identity and threading primitives.
mailto
mailto: URI primitives.
message
Message structure primitives.
mime
MIME primitives reused from the RustUse web set.
smtp
SMTP protocol vocabulary primitives without network I/O.