Definitions of Commands and Replies
Summary of Commands and Replies
Commands Replies
-------- -------
USER name +OK
PASS password -Error
RETR mailbox #xxx
RDEL mailbox
RCEV
RCVD
QUIT
NOOP
RSET
Commands
USER name
This command identifies the user to the server. It must be followed by the PASS command.
Possible responses: "+OK" or "-ERR"
PASS password
The PASS command carries the password authenticating this user. Together the USER name and PASS password are used by the server to control access to the mailboxes.
Possible responses: "+OK" or "-ERR"
RETR mailbox
This command begins a mail reading transaction. The RETR command is used to read all the messages in a mailbox without deleting them. It must be followed by the RCEV command.
Possible responses: "#xxx" or "-ERR"
RDEL mailbox
This command begins a mail reading transaction. The RDEL command is used to read all the messages in a mailbox and delete them. It must be followed by the RCEV command.
Possible responses: "#xxx" or "-ERR"
RCEV
This command confirms that the client is ready to receive the mail data. It must be followed by the RCVD command.
Possible responses: "+OK" or (connection aborted)
RCVD
This command confirms that the client has received and accepted the mail. The RCVD command ends the mail reading transaction. In the case of the RDEL transaction, it is possible that the mail is not necessarily deleted. This is indicated by an error reply.
Possible responses: "+OK" or "-ERR"
QUIT
This command indicates the client is done with the session. The server sends an OK response and then closes the connection.
Possible responses: "+OK" then Close
NOOP
This is the no operation command. It causes no action on the part of the server except an OK response.
Possible response: "+OK"
RSET
This command causes the server to abort the current transaction and return to waiting for a command (one of RDEL, RETR, QUIT, NOOP, or RSET). When aborting a transaction the server must take care to properly close and unlock the mailbox.
Possible response: "+OK"