MessageFlagSet Class
Represents a set of flags of a mail message.
Inheritance Hierarchy
SystemObject
  MailBee.ImapMailMessageFlagSet

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public class MessageFlagSet

The MessageFlagSet type exposes the following members.

Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberSystemFlagsToString
Converts the specified set of system message flags into IMAP4 flag list.
Public methodToString
Returns the entire list of flags as a string.
(Overrides ObjectToString.)
Top
Properties
  NameDescription
Public propertyAllFlags
Gets the entire list of flags as array of strings.
Public propertySystemFlags
Gets the system (standard) flags subset of the entire list of flags.
Top
Remarks

Message flags can be of two types: system (standard) and non-standard. System flags can be examined using SystemFlags property. AllFlags property returns all the flags as an array of strings. ToString method returns all the the flags as a string.

To learn flags of particular messages, the developer can use DownloadEnvelopes(String, Boolean) method (or its overloads), and then examine Flags property of Envelope objects contained within the returned EnvelopeCollection.

To learn which message flags are defined in the currently selected folder, the developer can use Flags property of the Imap object.

To learn which message flags can be applied to messages permanently of whether it's allowed to define new flags by applying them to messages, the developer can use PermanentFlags property of the Imap object.

To apply flags to messages, the developer can use SetMessageFlags(String, Boolean, String, MessageFlagAction, Boolean) method. DeleteMessages(String, Boolean) method is a particular case of SetMessageFlags(String, Boolean, String, MessageFlagAction, Boolean) method which adds "\Deleted" flag to messages.

To search messages having specified flags set, the developer can use Search(Boolean, String, String) method.

Note Note
Message flags is not the same as folder flags (FolderFlags). Each folder has 3 groups of flags set: folder flags (which can be examined via Flags property of Folder object), permanent message flags (PermanentFlags property of the Imap object), and available message flags (Flags property of the Imap object).
See Also