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):
Imports Rebex.Mail
Imports Rebex.Net
...
Dim server as string = "imapServer"
Dim username as string = "myUsername"
Dim password as string = "myPassword"
''# create client, connect and log in
Dim client As new Imap
client.Connect(server)
client.Login(username, password)
''# select the folder for search operation
client.SelectFolder("Inbox")
''# find unread messages
Dim messages as new ImapMessageCollection
messages = client.Search( _
ImapSearchParameter.HasFlagsNoneOf(ImapMessageFlags.Seen ) _
)
Console.WriteLine ("Found {0} unread messages.", messages.Count)
''# list unread messages:
Dim message As ImapMessageInfo
For Each message In messages
Console.WriteLine( _
"{0} | {1} | {2} | {3}", _
message.UniqueID, _
message.From, _
message.To, _
message.Subject)
Next
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.