ews-java-api icon indicating copy to clipboard operation
ews-java-api copied to clipboard

How to set or get a follow-up Flag on an email ?

Open robin990 opened this issue 7 years ago • 3 comments

How to set or get a follow-up Flag on an email ? flag 1.GET Flag: I can find some solution only for C#, like this flag2 2.SET FLAG I can find some solution for Java api, like this flag3 but some Class not found in ews-java-api-2.0.jar, flag4 Can some one help me, 快来拯救我 :)

robin990 avatar Jul 28 '17 13:07 robin990

I think you should find the conversation first, and then to check the flag status of that conversation. My code is like this:

ConversationId conversationId = emailMessage.getConversationId();

        Collection<Conversation> conversations =  emailMessage.getService().findConversation(new ConversationIndexedItemView(10), emailMessage.getParentFolderId());
        for(Conversation conversation : conversations) {
            if (conversation.getId().equals(conversationId) ){
                isFlagged = (conversation.getFlagStatus()== Flagged);
            }
        }
        isFlagged = false;

Saix1020 avatar Nov 22 '17 07:11 Saix1020

Any update for setting a flag status for a message?

leungyukshing avatar Apr 07 '21 07:04 leungyukshing

someOne kenow how to set flag?

ace0326 avatar Apr 20 '22 08:04 ace0326