Using µC/POP3c

Include Files

Wherever you want to use µC/POP3c, you should include the following header:

Include file
Description
Source/pop3-c.hContains POP3 client API definitions

Module initialization

µC/POP3c does not require to be initialized. Although, if it is requires to use the DNS features, µC/DNSc shall be properly initialized.

Connection and authentication to POP3 server

To read available mails in a mailbox, an application need to connect  and authenticate to a POP3 server. First, it must establish a connection with the POP3 server either in secure or non-secure mode. Since must of the mail serve provider use secure mode, it may need to use SSL/TLS module. Once the connection is properly established, the application must authenticate to the serve with a mail account credentials (username/password). When those two step are successful, it is possible to access to the mailbox and the emails available. Finally, the client must disconnect to the server. 

Function name
Description
POP3c_Connect()Establishes a TCP connection with the POP3 server.
POP3c_Authenticate()Logs the user into the system (the POP3 server).
POP3c_Disconnect()Close the connection between the client and the server.

Mailbox operation 

Once the client is properly connected and authenticated, the following mailbox operations are available:

Function name
Description
POP3c_MboxStat()Get the number of messages in the mailbox, as well as its total size.
POP3c_MsgStat()Get the size of a specific message from the POP3 server.
POP3c_MsgRetrieve()Gets a specific message from the POP3 server
POP3c_MsgRead()Reads and structures a message previously retrieved from a POP3 server.
POP3c_MsgDel()Deletes a specific message from the server.