configure_discovered (wizard/imap_smtp.rs)

himalaya · src/wizard/imap_smtp.rs · rust · Apache-2.0
email

Wizard function that configures IMAP and SMTP accounts with SASL prompts and connection tests.

// 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.
//! # IMAP and SMTP wizard
//!
//! Configures an account against the IMAP and submission endpoints
//! discovery pinned.
//!
//! The SASL mechanism is picked, its credentials prompted and the IMAP
//! connection tested. With a submission endpoint too, the wizard asks
//! whether SMTP shares them, and runs the prompts again when it does not,
//! the two sides being free to advertise different mechanisms.
//!
//! No SMTP host is ever invented: with nothing discovered the account is
//! IMAP-only and SMTP is added by hand.

use anyhow::{Result, bail};
use io_pim_discovery::compose::config::DiscoverySecurit

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

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

Get a free API key