Rust

settings

Module

How a client connects: encryption, certificate checks and deadlines.

Contents

use utopia_smtp::Timeouts;
Rust
pub struct Timeouts

How long each kind of wait may last. Reaching a server and hearing back from it deserve different patience; each bounds one operation, not a session.

Rust
use std::time::Duration;
use utopia_smtp::Timeouts;

let timeouts = Timeouts::new(1.5, 90.0, 45.0)?;
assert_eq!(timeouts.connect(), Duration::from_millis(1500));
assert!(Timeouts::new(0.0, 30.0, 30.0).is_err());
assert!(Timeouts::default().connect() < Timeouts::default().read());
Also implements Default.
use utopia_smtp::Tls;
Rust
pub struct Tls

How the TLS handshake is checked.

use utopia_smtp::Encryption;
Rust
pub enum Encryption

Whether and how the session is encrypted.

use utopia_smtp::Verification;
Rust
pub enum Verification

How much of the certificate to believe.