Are there any short examples that note how to delete an email from an inbox?
Have a look at the VMime Book here:
I saw the following as an example
// Get a reference to the folder
vmime: : ref <vmime: : net : : folder> folder = store>getDefaultFolder ( ) ;
What I needed was is seen in the following example:
list = read emails from server for email ID
i = 0
while not end list_ do
return_code = process_email(list)
if return_code == good
message_id = get_message_id_from_email(list) <-- ???
delete(message_id) <-- ???
For the lines with "???", how does one get the mail ID from the message? I have seen examples for "Subject", "From", "To" and even attachments - but not for mail_id….
The deleteMessage() method takes a message number in argument, not a message ID.
Use getNumber() on the vmime::net::message object to get it.