Java Mail POP3Client Example

Advertisement

This Example shows you how to POP3Client using javamail api. All messages are stored in Folder objects.

Java Mail POP3Client Example

This Example shows you how to POP3Client using javamail
api. All messages are stored in Folder objects. folders can contain folders or
messages. The Folder class
declares methods that fetch, append, copy and delete messages. These are some of the methods used in the program.

System.getProperties() this method
get thesystem properties. Session.getDefaultInstance(properties) this method get the default Session
object. session.getStore("pop3") this method get a Store object that
implements the pop3 protocol. store.connect(host, user, password) Connect to the current host using the
specified username and password. store.getFolder("inbox") create a Folder object of the inbox. folder.open(Folder.READ_ONLY) open the Folder. folder.getMessages() get all messages for the folde.