|
What method would i use to go about getting the last 25 mails in a pop account. I want the top 25 opened and unopened. I have been working on a few things but only see that I can get latest 25 unopened but this makes my app seem a bit weird Thanks |
|
Unfortunately the POP3 protocol doesn't support concept of read/unread messages. It can return only all messages on the mailbox. Some servers may opt to return only unread messages, some would return all messages in the Inbox folder. The read/unread flag in POP3 client is usually implemented on client: the client has list of message unique ids which has been downloaded and/or read and shows all messages not in list as 'unread'. If you want to work with unread messages on server you have to use different protocol - such as IMAP. The IMAP protocol know about messages flags and can search for messages with specified flag set. See following code (again using Rebex Mail component):
More info about IMAP searching can be found at "Searching for messages" section in the IMAP tutorial. Could you update your question and tell us which POP3 server are you using? It might be possible to configure it in such way that it returns all messages via POP3. |