HS POP3 Library 2.0.5
S POP3 is a software library in C (supplied with full source code) implements the client side of Post Office Protocol Version 3 (POP3) over TCP socket layer according to RFC 1939. Among other features, the library supports user authentication, reception of basic internet headers and text, message deletion and statistics
HS POP3 supports secure POP3 over TLS / SSL using two methods: POP3S (used by Gmail) and RFC 2595
HS POP3 supports extracting binary file attachments in MIME v1.0 base64 format.
The user application calls HS POP3 initialisation function supplying pointers to callback functions in user code for memory amd timer management and for reporting POP3 events to user.
To receive email messages from any POP3 RFC1939 compliant server, the user application calls HsPop3GetMail function, specifying mail server name or IP address and login user name and password.
HS POP3 library then resolves the server name, connects to it, receives and message scan list. according to RFC1939 standard. Once HS POP3 has a unique message ID from the server, it reports this message ID to user application via callback function. The user application returns a specific value if it wants to receive this message. At this point HS POP3 will request necessary amount of memory for the message and will receive complete message into the buffer. Once message is received, the user code is notified with a callback and a message structure, containing full message pointer, message length, start of text pointer, length of headers and separate parsed out header information: from field, date field, message id field and subject field. This process is repeated until all messages are received. HS POP3 library can also delete messages from server if this option is specified.
Modular design makes it easy to port HS POP3 protocol module to any environment. HS POP3 internally at a lower layer interfaces to HS Sock library which provides TCP transport services.