The POP3 protocol does not provide the ability to ask the server which emails are "unread". Furthermore, a pure POP3 server does not even keep this information. Some servers, such as Exchange Server, expose both POP3 and IMAP interfaces. In these cases, information about read/unread status exists on the server, but it is only available via the IMAP protocol. Email clients such as Outlook and Thunderbird keep read/unread information on the client computer (if the email account is specified to be POP3).
Here are examples showing how to keep a file of "seen" UIDLs and download only unseen UIDLs:
ASP: Reading Unread POP3 Email
C#: Reading Unread POP3 Email
C++: Reading Unread POP3 Email
Delphi: Reading Unread POP3 Email
Visual FoxPro: Reading Unread POP3 Email
Java: Reading Unread POP3 Email
Perl: Reading Unread POP3 Email
Python: Reading Unread POP3 Email
Ruby: Reading Unread POP3 Email
VB.NET: Reading Unread POP3 Email
Visual Basic: Reading Unread POP3 Email
VBScript: Reading Unread POP3 Email