Defines CLI subcommand to check/test email account credentials, triggers validation logic.
use std::{fmt, path::PathBuf};
use anyhow::{Result, bail};
use clap::Parser;
#[cfg(feature = "imap")]
use io_sasl::mechanism::SaslMechanism;
use pimalaya_cli::printer::Printer;
use pimalaya_config::toml::TomlConfig;
use schemars::JsonSchema;
use serde::Serialize;
#[cfg(feature = "imap")]
use crate::config::ImapConfig;
use crate::{
backend::Backend,
config::{AccountConfig, Config},
};
/// Validate the account configuration.
///
/// Loads the TOML configuration, picks the active account (via the
/// global `--account` flag or the default), and checks each backend
/// allowed by `--backend`. The check tries to instantiate a client per
/// backend, which exercises the same handshake / authentication paths
/// the other commands would take.
#[derive(Debug, Parser)]
pub struct Account
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key