While working on a Java application, I found the need for a simple Java mailbox reader. I wanted to be able to scan through one of my POP/POP3 mailboxes for messages, and then do something with those messages.
To that end I created the following example JavaMail POP mailbox reader. It connects to a standard POP/POP3 mailbox, then scans through all the messages in the "Inbox" folder.