+1 vote

ImapClient.FlagMessageByUID(UId, Flag.Unflagged)I want to remove a flag from the mail so i am using this function but it does not work for me.

I had used this function for other flag for example read, flaggged etc and it is working fine for other flag but not working for Unflagged.

by (1.6k points)
edited by

1 Answer

0 votes
 
Best answer

Negative flags (unseen, unflagged) can't be assigned. You need to remove positive flags (seen, flagged) instead. Please use Imap.UnflagMessageByUID:

ImapClient.UnflagMessageByUID(UId, Flag.Flagged);
by (297k points)
selected by
...