pub enum Command<'a> {
Show 13 variants
Ehlo(&'a str),
Helo(&'a str),
MailFrom {
path: ReversePath<'a>,
params: Vec<Param<'a>>,
},
RcptTo {
path: ForwardPath<'a>,
params: Vec<Param<'a>>,
},
Data,
Rset,
Quit,
Noop(Option<&'a str>),
Vrfy(&'a str),
Help(Option<&'a str>),
StartTls,
Auth {
mechanism: AuthMechanism,
initial_response: Option<&'a str>,
},
AuthResponse(&'a str),
}Expand description
A parsed SMTP command, borrowed from the input line.
Lifetimes match the input slice given to parse_command, so commands
must be consumed before the input buffer is reused.
Variants§
Ehlo(&'a str)
EHLO <domain> — start an ESMTP session.
Helo(&'a str)
HELO <domain> — start a legacy SMTP session.
MailFrom
MAIL FROM:<reverse-path> [params] — open a mail transaction.
Fields
path: ReversePath<'a>Reverse path (envelope sender).
RcptTo
RCPT TO:<forward-path> [params] — add a recipient.
Fields
path: ForwardPath<'a>Forward path (envelope recipient).
Data
DATA — begin message body input.
Rset
RSET — reset the mail transaction.
Quit
QUIT — close the connection.
Noop(Option<&'a str>)
NOOP [string] — no-op.
Vrfy(&'a str)
VRFY <user> — verify a user.
Help(Option<&'a str>)
HELP [topic] — request help.
StartTls
STARTTLS — upgrade the connection to TLS (RFC 3207).
Auth
AUTH <mechanism> [initial-response] — start SASL authentication.
Fields
mechanism: AuthMechanismSASL mechanism the client wants to use.
AuthResponse(&'a str)
Continuation line during an in-progress AUTH challenge.