Crate lettre[][src]

Lettre is an email library that allows creating and sending messages. It provides:

  • An easy to use email builder
  • Pluggable email transports
  • Unicode support
  • Secure defaults

Lettre requires Rust 1.45 or newer.

Optional features

  • builder: Message builder
  • file-transport: Transport that write messages into a file
  • file-transport-envelope: Allow writing the envelope into a JSON file
  • smtp-transport: Transport over SMTP
  • sendmail-transport: Transport over SMTP
  • rustls-tls: TLS support with the rustls crate
  • native-tls: TLS support with the native-tls crate
  • tokio02: Allow to asyncronously send emails using tokio 0.2.x
  • tokio02-rustls-tls: Async TLS support with the rustls crate using tokio 0.2
  • tokio02-native-tls: Async TLS support with the native-tls crate using tokio 0.2
  • tokio1: Allow to asyncronously send emails using tokio 1.x
  • tokio1-rustls-tls: Async TLS support with the rustls crate using tokio 1.x
  • tokio1-native-tls: Async TLS support with the native-tls crate using tokio 1.x
  • async-std1: Allow to asynchronously send emails using async-std 1.x
  • NOTE: native-tls isn’t supported with async-std at the moment
  • async-std1-rustls-tls: Async TLS support with the rustls crate using async-std 1.x
  • r2d2: Connection pool for SMTP transport
  • tracing: Logging using the tracing crate
  • serde: Serialization/Deserialization of entities
  • hostname: Ability to try to use actual hostname in SMTP transaction

Re-exports

pub use self::transport::AsyncTransport;
pub use crate::message::Message;
pub use crate::transport::file::AsyncFileTransport;
pub use crate::transport::file::FileTransport;
pub use crate::transport::sendmail::AsyncSendmailTransport;
pub use crate::transport::sendmail::SendmailTransport;
pub use crate::transport::Transport;

Modules

address

Email addresses

error

Error type for email messages

messagebuilder

Provides a strongly typed way to build emails

transport

Sending Messages

Structs

Address

Represents an email address with a user and a domain name.

AsyncSmtpTransport
AsyncStd1Executorasync-std1
SmtpTransport

Transport using the SMTP protocol

Tokio1Executortokio1
Tokio02Executortokio02

Traits

Executor