EmailClient (shared/client.rs)

himalaya · src/shared/client.rs · rust · Apache-2.0
email

Rust email client supporting multiple backends and SMTP, with unified API.

// Source: https://github.com/pimalaya/himalaya | License: Apache-2.0 | Copyright 2022-2026 soywod <pimalaya.org@posteo.net>
// Provided via justclaw.it.com; keep this notice with the code.
//! # Email client
//!
//! The cross-protocol client every shared subcommand runs over: one
//! storage backend, plus an SMTP transport for the backends that cannot
//! send.
//!
//! The storage backend is the first configured one `--backend` allows,
//! local before network. Each method matches on it and calls that
//! protocol's adapter, which takes and returns the CLI's own
//! [`crate::email`] types.
//!
//! The active [`Account`] is threaded as a sibling argument through every
//! `execute` chain rather than bundled into the client.

#[cfg(feature = "smtp")]
use std::mem;

use anyhow::{Result, anyh

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key