PowerTCP Mail for .NET
Set(ICollection,ImapFlagModifier,ImapFlags) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Mailbox Class > Set Method : Set(ICollection,ImapFlagModifier,ImapFlags) Method




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.
Sets flag values on a collection of messages.

Syntax

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)
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.

Exceptions

ExceptionDescription
Dart.PowerTCP.Mail.ProtocolExceptionBad IMAP protocol response received from server.
System.Net.Sockets.SocketExceptionThe requested address is not valid in its context.
System.ArgumentOutOfRangeExceptionindex was out of range
System.IndexOutOfRangeExceptionindex was outside bounds of array
Dart.PowerTCP.Mail.InvalidParameterTypeExceptionCollection contains instances of wrong type of object

Remarks

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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.