rusted-mail
rusted-mail is a typed, asynchronous protocol and storage engine for mail
applications. It provides IMAP, SMTP, POP3, JMAP, provider discovery, local storage,
offline operations, and optional OpenPGP/S/MIME support without linking JNI or
an Android runtime.
Quick start
use ;
async
The API also exposes owned Pop3Session and JmapSession handles, typed message actions,
attachment helpers, mailbox management, searches, and provider discovery.
POP3 retrieval
use ;
# async
Pop3ServerConfig::start_tls upgrades with STLS. The explicit
plain_text constructor is intended only for trusted, isolated test fixtures.
Private/local endpoints and nonstandard ports also require exact opt-in with
MailEngine::builder().allow_private_network_target(...).allow_port(...).
Private certificate authorities can be added without disabling hostname
verification by calling
MailEngine::builder().add_trusted_root_certificate_der(...). The added root
is used consistently by JMAP HTTPS, IMAP TLS, SMTP TLS, and POP3 TLS.
Features
turso-native-syncenables Turso native synchronization.crypto-openpgpenables OpenPGP processing.crypto-smimeenables S/MIME processing.
No optional feature is enabled by default.
Runtime
The crate uses Tokio and integrates with tracing. Applications own the async
runtime; rusted-mail operations are ordinary async methods. Configure optional
engine defaults with MailEngine::builder().
JNI and Android packaging live in the sibling rusted-mail-jni and
rusted-mail-android packages.