JAVAMAIL marks all my inbox new messages as open/read

Posted by mlan on Stack Overflow See other posts from Stack Overflow or by mlan
Published on 2010-03-20T22:54:57Z Indexed on 2010/03/20 23:01 UTC
Read the original article Hit count: 292

Filed under:

All my new messages in the INBOX (a Domino POP3) are open (or marked as Read) by the following codes:

  props.put("mail.smtp.host", host);
  Session session1 = Session.getInstance(props, null);
  Store store = session1.getStore("pop3");
  store.connect(host,u,p);
  Folder folder = store.getFolder("INBOX");
  folder.open(Folder.READ_ONLY);
  SearchTerm st = new SubjectTerm("Test Javamail");
  Message msg[] = folder.search(st);

  if (1==1) return;

Is it by design?

© Stack Overflow or respective owner

Related posts about javamail