Mailbox access

When connected to a POP3 server, a session is established with the sequence of message IDs. To retrieve a message from a POP3 server, user must specify the message ID and provide a message instance to populate. As demonstrated, the function used for that purpose is pop3::fetch(). The first parameter is the message ID as determined by the session. There is a possibility not to fetch the entire message, but the header only, which is the third function's parameter. By default it is set to false, when set to true, the message body will not be retreived from the server. In case of big messages, it could be a way to peek messages but not download them entirely.

Some POP3 servers support unique message IDs, which remain independent of sessions. For that purpose, the method pop3::uidl() exists. It will list unique IDs of all messages of a mailbox. However, this command is not supported by all servers.