| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function Set( _ ByVal messages As ICollection, _ ByVal operation As ImapFlagModifier, _ ByVal flags As ImapFlags _ ) As ImapResponse | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim messages As ICollection Dim operation As ImapFlagModifier Dim flags As ImapFlags Dim value As ImapResponse value = instance.Set(messages, operation, flags) | |
| C# | |
|---|---|
public ImapResponse Set( ICollection messages, ImapFlagModifier operation, ImapFlags flags ) | |
| Managed Extensions for C++ | |
|---|---|
public: ImapResponse* Set( ICollection* messages, ImapFlagModifier operation, ImapFlags flags ) | |
| C++/CLI | |
|---|---|
public: ImapResponse^ Set( ICollection^ messages, ImapFlagModifier operation, ImapFlags flags ) | |
Parameters
- messages
- The collection containing ImapMessage objects on which to modify the flags.
- operation
- An ImapFlagModifier value specifying the operation to perform on the flags.
- flags
- An ImapFlags value specifying the flags to modify.
Return Value
An ImapResponse object encapsulating the response from the server.| Exception | Description |
|---|---|
| Dart.PowerTCP.Mail.ProtocolException | Bad IMAP protocol response received from server. |
| System.Net.Sockets.SocketException | The requested address is not valid in its context. |
| System.ArgumentOutOfRangeException | index was out of range |
| System.IndexOutOfRangeException | index was outside bounds of array |
| Dart.PowerTCP.Mail.InvalidParameterTypeException | Collection contains instances of wrong type of object |
The Mailbox.Set method sets the values of one or more flags on the messages represented by the ImapMessage objects contained within messages. This command results in an IMAP STORE command being issued to the server for each message. The command uses the UIDs of the messages in the collection to perform the set operation. The ImapMessage objects contained within messages must be within this mailbox.
This method is useful for bulk operations. If you would like to set a flag on a single message, use the properties of the ImapMessage object representing that message.
Target Platforms: Microsoft .NET Framework 2.0