OfficeDev / ews-java-api

A java client library to access Exchange web services. The API works against Office 365 Exchange Online as well as on premises Exchange.
MIT License
869 stars 560 forks source link

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

Open robin990 opened 7 years ago

robin990 commented 7 years ago

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, 快来拯救我 :)

Saix1020 commented 6 years ago

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;
leungyukshing commented 3 years ago

Any update for setting a flag status for a message?

ace0326 commented 2 years ago

someOne kenow how to set flag?