| Visual Basic (Declaration) | |
|---|---|
Public Enum ImapFlagModifier Inherits System.Enum | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As ImapFlagModifier | |
| C# | |
|---|---|
public enum ImapFlagModifier : System.Enum | |
| Managed Extensions for C++ | |
|---|---|
__value public enum ImapFlagModifier : public System.Enum | |
| C++/CLI | |
|---|---|
public enum class ImapFlagModifier : public System.Enum | |
| Member | Description |
|---|---|
| Add | 1 Adds the specified flags to the message. |
| Remove | 2 Removes the specified flags from the message. |
| Replace | 3 Replace the specified flags on the message. |
The following example demonstrates using the Set method to change message flags.
| Visual Basic | Copy Code |
|---|---|
' Login to the server Imap1.Login(Server, User, Pass) ' Get the current mailbox in a short variable name so we don't have to type as much Dim Box As Mailbox = Imap1.CurrentMailbox Dim First As ImapMessage = Box.Messages(0) Dim Last As ImapMessage = Box.Messages(box.Messages.Count - 1) ' Add Flagged and Answered flags to messages Box.Set(First, Last, ImapFlagModifier.Add, ImapFlags.Flagged | ImapFlags.Answered) ' Refresh the mailbox. Box.Refresh() ' Logout Imap1.Logout() | |
| C# | Copy Code |
|---|---|
// Login imap1.Login(Server, User, Pass); // Get the current mailbox in a short variable name so we don't have to type as much Mailbox box = imap1.CurrentMailbox; ImapMessage first = box.Messages[0]; ImapMessage last = box.Messages[box.Messages.Count - 1]; // Add Flagged and Answered flags to messages box.Set(first, last, ImapFlagModifier.Add, ImapFlags.Flagged | ImapFlags.Answered); // Refresh the mailbox. box.Refresh(); // Logout imap1.Logout(); | |
The ImapFlagModifier enumeration represents the method used when modifying flags on the server. This type is used when calling the Mailbox.Set command to update one or more flags on messages, and it is used in combination with the ImapFlags enumeration.
System.Object
System.ValueType
System.Enum
Dart.PowerTCP.Mail.ImapFlagModifier
Target Platforms: Microsoft .NET Framework 2.0