Package com.sun.mail.pop3

Examples of com.sun.mail.pop3.POP3Folder.open()


    Message[] messageArray = null;
    try {
      folder = (POP3Folder)store.getFolder("INBOX");

      // open the remote folder for reading (and writing)
      folder.open(Folder.READ_WRITE);

      // get all the messages from the remote folder
      messageArray = folder.getMessages();
    }catch(MessagingException e){
      try {folder.close(mailAccountVO.isLeaveMessagesOnServer());} catch (Exception ex) {}
View Full Code Here


        final Session session = Session.getDefaultInstance(props);
        session.setDebug(isDebug());
        final Store store = session.getStore(transport);
        store.connect(getLogin(request), getPassword(request));
        final POP3Folder inbox = (POP3Folder) store.getFolder("INBOX");
        inbox.open(Folder.READ_WRITE);
        final FetchProfile profile = new FetchProfile();
        profile.add(UIDFolder.FetchProfileItem.UID);
        final Message[] messages = inbox.getMessages();
        inbox.fetch(messages, profile);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.