POP3c_MsgRetrieve()
Gets a specific message from the POP3 server.
Files
pop3-c.h/pop3-c.c
Prototype
void POP3c_MsgRetrieve (NET_SOCK_ID sock, CPU_INT32U msg_nbr, CPU_CHAR *dest_buf, CPU_INT32U buf_size, CPU_BOOLEAN del_msg, NET_ERR *perr);
Arguments
sock
Socket ID returned by POP3c_Connect()
.
msg_nbr
Index of message of interest.
dest_buf
Pointer to allocated buffer used to copy the message.
buf_size
Size of dest_buf
.
del_msg
Indicate if the message should be deleted from the server.
perr
Pointer to a variable that will hold the return error code from this function:
Returned Values
None.
Required Configuration
None.
Notes / Warnings
- The
msg_nbr
argument starts at the value ‘1’. Message ‘0’ does not exist. - The client software is responsible for providing a large enough buffer in order to contain the whole message. Failure to do so might lead to runtime problems. If the buffer passed is too small for a given message, only the first
buf_size - 1
bytes will be copied, followed by a ‘\0
’. SeePOP3c_RespServerMulti()
for more information.
Example Usage
See Sample Application.