Package javax.mail

Examples of javax.mail.FetchProfile


        msgs = folder.search(new FlagTerm(new Flags(Flags.Flag.SEEN), false));
      } else {
        msgs = folder.getMessages();
      }
      // Use a suitable FetchProfile
      final FetchProfile fp = new FetchProfile();
      fp.add(FetchProfile.Item.ENVELOPE);
      fp.add(FetchProfile.Item.FLAGS);
      fp.add("X-Mailer");
      folder.fetch(msgs, fp);

      for (int i = 0; i < msgs.length; i++) {
        final Mail mail = new Mail();
        setEnvelope(mail, msgs[i]);
View Full Code Here


            addResult(aFolder);

            Message[] messages = aFolder.getMessages();

            // Use a suitable FetchProfile
            FetchProfile fp = new FetchProfile();
            fp.add(FetchProfile.Item.ENVELOPE);
            fp.add(FetchProfile.Item.FLAGS);
            fp.add("X-Mailer");
            aFolder.fetch(messages, fp);

            // add all messages to the result
            addResult(messages);
View Full Code Here

            // fetch messages
            // Note: Not preloading CONTENT_INFO. For some reason, preloading the content info (IMAP BODYSTRUCTURE)
            // causes the call to getContent to return empty. (As if there was a bug where getContent saw the cached
            // body structure and thought that the content itself was cached, but I'd think a bug like that would have
            // been found by many people and fixed long ago, so I'm assuming it's something else.)
            FetchProfile fp = new FetchProfile();
            fp.add(FetchProfile.Item.ENVELOPE);
            Message[] msgs = inputFolder.getMessages();
            inputFolder.fetch(msgs, fp);

            log.debug("About to process {} messages", msgs.length);
View Full Code Here

        if(msgs.length < 1){
          return emails;
        }

        // Use a suitable FetchProfile
        FetchProfile fp = new FetchProfile();
        fp.add(FetchProfile.Item.CONTENT_INFO);
        folder.fetch(msgs, fp);

        for (int i = 0; i < msgs.length; i++) {
          Message msg = msgs[i];
          Map<String, Object> email = new HashMap<String, Object>();
View Full Code Here

TOP

Related Classes of javax.mail.FetchProfile

Copyright © 2018 www.massapicom. 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.