pub enum Command {
Show 14 variants
Ehlo {
domain_or_address: DomainOrAddress,
},
Helo {
domain_or_address: DomainOrAddress,
},
Mail {
reverse_path: String,
parameters: Vec<Parameter>,
},
Rcpt {
forward_path: String,
parameters: Vec<Parameter>,
},
Data,
Rset,
Vrfy {
user_or_mailbox: AtomOrQuoted,
},
Expn {
mailing_list: AtomOrQuoted,
},
Help {
argument: Option<AtomOrQuoted>,
},
Noop {
argument: Option<AtomOrQuoted>,
},
Quit,
StartTLS,
AuthLogin(Option<String>),
AuthPlain(Option<String>),
}
Variants§
Ehlo
Fields
domain_or_address: DomainOrAddress
Helo
Fields
domain_or_address: DomainOrAddress
Rcpt
Data
Rset
Vrfy
This command asks the receiver to confirm that the argument identifies a user or mailbox. If it is a user name, information is returned as specified in Section 3.5.
This command has no effect on the reverse-path buffer, the forward- path buffer, or the mail data buffer.
Fields
user_or_mailbox: AtomOrQuoted
Expn
This command asks the receiver to confirm that the argument identifies a mailing list, and if so, to return the membership of that list. If the command is successful, a reply is returned containing information as described in Section 3.5. This reply will have multiple lines except in the trivial case of a one-member list.
This command has no effect on the reverse-path buffer, the forward- path buffer, or the mail data buffer, and it may be issued at any time.
Fields
mailing_list: AtomOrQuoted
Help
This command causes the server to send helpful information to the client. The command MAY take an argument (e.g., any command name) and return more specific information as a response.
SMTP servers SHOULD support HELP without arguments and MAY support it with arguments.
This command has no effect on the reverse-path buffer, the forward- path buffer, or the mail data buffer, and it may be issued at any time.
Fields
argument: Option<AtomOrQuoted>
Noop
This command does not affect any parameters or previously entered commands. It specifies no action other than that the receiver send a “250 OK” reply.
If a parameter string is specified, servers SHOULD ignore it.
This command has no effect on the reverse-path buffer, the forward- path buffer, or the mail data buffer, and it may be issued at any time.
Fields
argument: Option<AtomOrQuoted>
Quit
This command specifies that the receiver MUST send a “221 OK” reply, and then close the transmission channel.
The receiver MUST NOT intentionally close the transmission channel until it receives and replies to a QUIT command (even if there was an error). The sender MUST NOT intentionally close the transmission channel until it sends a QUIT command, and it SHOULD wait until it receives the reply (even if there was an error response to a previous command). If the connection is closed prematurely due to violations of the above or system or network failure, the server MUST cancel any pending transaction, but not undo any previously completed transaction, and generally MUST act as if the command or transaction in progress had received a temporary error (i.e., a 4yz response).
The QUIT command may be issued at any time. Any current uncompleted mail transaction will be aborted.