javamail mark gmail message as read

前端 未结 9 689
陌清茗
陌清茗 2021-01-31 03:13

Note: added after answer: Thanks.. Yeah I had tried the Flag.SEEN to true and saveChanges.. I also had read getContent marks it read. I tried using it in the for statement that

9条回答
  •  不要未来只要你来
    2021-01-31 03:55

    for (Message message : messages) {
                        message.setFlag(Flags.Flag.SEEN,true);
                    }
    

    and change the below line

    folder.open(Folder.READ_ONLY);

    to this

    folder.open(Folder.READ_WRITE);

提交回复
热议问题