The POP3 protocol is used for online mail receiving. Understanding POP3 helps us to better understand the mail system. You can also telnet to the mail server to receive emails using the POP3 protocol.
Generally, you can use these commands after Telnet POP3 server 110. These commands are case-insensitive and do not include the password itself. Be sure not to display the password back. After the verification is passed, the echo is allowed.
User Username recognized by the user
Pass password: if the execution is successful, the status is converted.
APOP name, digest recognizes a secure transmission password method. If the password is successfully transferred, the status is converted. For details, see RFC 1321.
Stat processes server send-back mailbox statistics, such as number of mails and total number of bytes
The UIDL n processing server returns the unique identifier used for the specified email. If no unique identifier is specified, all emails are returned.
List N processes the size of the specified email returned by the server, etc.
Retr n processes all text returned by the server
Dele N processes the server tag deletion, Which is deleted only when the quit command is executed.
Rset process undo all DELE commands
Top N, M processing returns the content of the first M lines of the N mail, and m must be a natural number
Noop processes the server and returns a positive response.
The quit client wants to end the session. If the server is in the "processing" status, it is now in the "Update" status to delete the emails marked as deleted. If the server is in the "approved" status, the server does not enter the "Update" status when the session ends.
A complete example of Telnet reception is as follows:
Telnet pop3server 110
User Username
Pass ****
Stat
List
RETR 1
RETR 2
...
Dele 1
Dele 2
...
Quit
(Article from: gcmail mail server software, http://9gcai.com/main/webbase/jishu/2011/0328/431.html)