pub struct SmtpSession {
    pub connection: ConnectionInfo,
    pub extensions: ExtensionSet,
    pub service_name: String,
    pub peer_name: Option<String>,
    pub output: Vec<DriverControl>,
    pub input: Vec<u8>,
    pub mode: Option<&'static str>,
    pub transaction: Transaction,
}

Fields

connection: ConnectionInfo

Description of the underlying connection

extensions: ExtensionSet

ESMTP extensions enabled for this session

service_name: String

The name of the service serving this session

peer_name: Option<String>

The name of the peer as introduced by the HELO command

output: Vec<DriverControl>

Output to be processed by a driver - responses and IO controls

input: Vec<u8>

Input to be interpretted

mode: Option<&'static str>

Special mode used to switch parsers

transaction: Transaction

Current e-mail transaction

Implementations

Special mode where classic SMTP data are expected, used after reading some data without CRLF to keep track of the dot state

Special mode where classic SMTP data are expected

Shut the session down without a response

Reply “250 Ok”

Reply “250 @info”

Reply “502 Not implemented”

Reply “500 Syntax error”

Reply “503 Command sequence error”

Reply “220 @name service ready”

Reply something like “250 @local greets @remote”

Reply something like “250 @local greets @remote, we have extensions:

Reply and shut the session down

Reply “421 @name service not available, closing transmission channel” and shut the session down

Reply “421 @name service not available, closing transmission channel” and shut the session down

Processing error

Normal response to quit command

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.