+1 vote
by (990 points)
edited

Is there a possiblity fo upload all flags with one call of this function? If i'm right i must call this function for each change of each flag.

Applies to: Rebex Secure Mail

1 Answer

+1 vote
by (148k points)
edited

Yes, this is possible:

C#:

Imap imap = new Imap();
...
imap.SetMessageFlags(id, ImapFlagAction.Replace, ImapMessageFlags.Flagged | ImapMessageFlags.Answered | ImapMessageFlags.Seen);

VB.NET:

Dim imap as New Imap
...
imap.SetMessageFlags(id, ImapFlagAction.Replace, ImapMessageFlags.Flagged Or ImapMessageFlags.Answered Or ImapMessageFlags.Seen)

This will set "Flagged", "Answered" and "Seen" flags on the specified message and remove any other flags.

...