MessageFlagAction Enumeration
Defines actions to be performed with the message flags.

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public enum MessageFlagAction
Members
  Member nameValueDescription
Replace0 The specified flags will replace the existing flags of the message.
Add1 The specified flags will be added to the list of existing flags of the message.
Remove2 The specified flags will be removed from the list existing flags of the message.
ReplaceGmailLabel3 The specified Gmail labels will replace the existing Gmail labels of the message.
AddGmailLabel4 The specified Gmail labels will be added to the list of existing Gmail labels of the message.
RemoveGmailLabel5 The specified Gmail labels will be removed from the list existing Gmail labels of the message.
Remarks

It's not error to attempt to remove flags which are not set or add flags which are already set. The server will simply do nothing in this case. For instance, if the application sets "\Deleted" flag for two messages and the first message already has this flag set, the first message flags will remain intact while the second message will acquire the "\Deleted" flag.

To remove all flags from the message (including both system and server-specific flags), the developer should call SetMessageFlags(String, Boolean, String, MessageFlagAction, Boolean) method passing empty flags and specifying Replace as action parameter value.

Values with GmailLabel suffix allow for setting Gmail-specific labels instead of ordinary IMAP flags. To use this functionality, make sure your mail server is Gmail-compatible ("x-gm-ext-1" capability must be listed in GetExtensions results). Gmail labels can only be used as strings (not as SystemMessageFlags values) so that you must use SetMessageFlags(String, Boolean, String, MessageFlagAction, Boolean) overload to set them.

See Also