protected Message getFullyLoad(Message message, Folder folder, String context) throws MessagingException { // use the copy constructor to try and copy the email over and work with it locally boolean read = isRead(message, context); MimeMessage msg = new MimeMessage((MimeMessage) message); // BUG: was marking IMAP emails as read: test account of aircel to verify try { if (!read && (folder instanceof IMAPFolder)) { message.setFlag(Flags.Flag.SEEN, false); } } catch (MessagingException me) { // Not all providers allow for setting of flags log.debug(String.format("failed to SEEN flag %s", context), me); } return msg; }