Async SMTP client for sending emails over TCP/TLS, supporting EHLO, AUTH, STARTTLS, etc.
// Source: https://github.com/lettre/lettre | License: MIT | Copyright 2014-2024 Alexis Mousset <contact@amousset.me>
// Provided via justclaw.it.com; keep this notice with the code.
use std::{fmt::Display, net::IpAddr, time::Duration};
use futures_util::io::{AsyncBufReadExt, AsyncWriteExt, BufReader};
#[cfg(feature = "tokio1")]
use super::async_net::AsyncTokioStream;
#[cfg(feature = "tracing")]
use super::escape_crlf;
#[allow(deprecated)]
use super::{
ClientCodec, MAX_RESPONSE_BYTES, MAX_RESPONSE_LINE_BYTES, TlsParameters,
async_net::AsyncNetworkStream,
};
use crate::{
Envelope,
transport::smtp::{
authentication::{Credentials, Mechanism},
commands::{Auth, Data, Ehlo, Mail, Noop, Quit, Rcpt, Starttls},
error,
error::Error,
extension
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key