how to keep track when messages has already been POPed?

+1 vote
asked May 10, 2010 by Eddie (330 points)
edited May 10, 2010

I am evaluating the Rebex with POP.NET. I can successfully make conenction and download messages. How do I keept track of the message or "leave a message on server" for a period of time. THis is like most of the pop client. To leave a copy on the server for other device to pop.

Is this possible in the control or I have to write my own code to keep track?

Thanks, Eddie

Applies to: Rebex Secure Mail

2 Answers

+2 votes
answered May 10, 2010 by Lukas Pokorny (121,330 points)
edited May 10, 2010
 
Best answer

POP3 server assigns a unique ID to each mail in the mailbox. This unique ID is the same each time you connect. This makes it possible for an application to keep track of the IDs of mails it retrieved (and that's what most POP3 client applications do)

The drawback of this is that some kind of persistent storage for the unique IDs is needed, so this is not an appropriate task for a POP3 library like Rebex POP3 for .NET. This means that you have to keep track of unique IDs yourself in your application.

To retrieve the list of mails including unique IDs, use GetMessageList method. For mor information about unique IDs and sequence numbers, check out the tutorial.

commented May 11, 2010 by Eddie (330 points)
Hi Lukas, that is exactly what I am looking for. No problem, I can keep all the processed messages by their unique IDs using MYSQL Database. The control is great. Will send order soon. Thank you Lukas M. for his contribution as well.
+1 vote
answered May 10, 2010 by Lukas Matyska (59,010 points)
edited May 10, 2010

Downloaded messages are not deleted from the POP3 server. To delete them you need to call the pop3.Delete method. Please note that deleted messages still remains on the POP3 server until you call the pop3.Disconnect() method.

Deleted messages can be restored by calling the pop3.Undelete() method or by disconnecting with the rollbackChanges argument set to true pop3.Disconnect(true).

...