Working with Message Flags on Server
Contents
[
Hide
]
Changing the Message Flags
You can change message flags by using the ChangeMessageFlags() method. This method takes two parameters.
- The sequence number of a message or its unique ID.
- MessageFlag.
The following flags can be set:
Setting Message Flags
The following code snippet shows you how to change message flags on an IMAP server with Aspose.Email.
Removing Message Flags
Message flags can also be removed with the RemoveMessageFlags() method. Usage is similar to that of the ChangeMessageFlags() method. It takes a sequence number or unique message ID and MessageFlag. The following code snippet shows you how to remove message flags.
Setting Custom Flags
You can also set custom flags to a message using the ImapClient of the API. The ImapClient AddMessageFlags provides the ability to set custom flags on messages.