Example: pop3_delete_ex

In the following example, the pop3_delete_ex function deletes the first and third messages.

// Logon to the POP3 server
pop3_logon_ex(&pppop3, "Login", "
        LAST );
// List all messages on the server and receive that value
totalMessages = pop3_list_ex(&pppop3, "POP3", LAST );
// Display the received value (It is also displayed by the pop3_list_ex function)
lr_log_message("There are %d total messages on the server.\r\n\r\n", totalMessages);
// Retrieve all messages on the server without deleting any of them
pop3_retrieve_ex(&pppop3, "POP3", "RetrieveList=ALL", "DeleteMail=false", LAST );
// Delete the 1st, 2nd and 3rd messages on the server
pop3_delete_ex(&pppop3, "POP3", "DeleteMail=1,2,3", LAST );
// Logoff
return 0;