async fn connect_stream(
context: &Context,
proxy_config: Option<ProxyConfig>,
strict_tls: bool,
candidate: ConnectionCandidate,
) -> Result<Box<dyn SessionBufStream>>
Expand description
Returns TLS, STARTTLS or plaintext connection using SOCKS5 or direct connection depending on the given configuration.
Connection is returned after skipping the welcome message and is ready for sending commands. Because SMTP STARTTLS does not send welcome message over TLS connection after establishing it, welcome message is always ignored to unify the result regardless of whether TLS or STARTTLS is used.