parse_smtp_server (smtp/client.rs)

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

Rust SMTP client wrapper with TLS, SASL, and proxy support for sending emails.

// 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.
//! # SMTP client
//!
//! The wrapper around io-smtp's blocking client every SMTP-specific
//! subcommand receives.
//!
//! Sending is stateless once authenticated, so unlike a storage backend
//! these commands need no account context: the merged [`Account`] comes
//! back for dispatch uniformity and is not threaded into them.

use std::{
    borrow::Cow,
    net::Ipv4Addr,
    ops::{Deref, DerefMut},
};

use anyhow::{Result, anyhow};
use io_sasl::mechanism::Sasl;
use io_smtp::{
    client::{SmtpClientStd as Inner, SmtpClientStdConnectOptions},
    rfc5321::SmtpEhloDomain,
    session::SmtpSessionOpenO

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

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

Get a free API key