| Visual Basic (Declaration) | |
|---|---|
Public Overloads Function Copy( _ ByVal messages As ICollection, _ ByVal destination As Mailbox _ ) As ImapResponse | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim messages As ICollection Dim destination As Mailbox Dim value As ImapResponse value = instance.Copy(messages, destination) | |
| C# | |
|---|---|
public ImapResponse Copy( ICollection messages, Mailbox destination ) | |
| Managed Extensions for C++ | |
|---|---|
public: ImapResponse* Copy( ICollection* messages, Mailbox* destination ) | |
| C++/CLI | |
|---|---|
public: ImapResponse^ Copy( ICollection^ messages, Mailbox^ destination ) | |
Parameters
- messages
- A collection of ImapMessage objects representing the messages to copy.
- destination
- The name of the destination mailbox.
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.Copy method copies the messages contained within the collection messages to the specified destination. This command results in an IMAP COPY command being issued to the server for each message. The command uses the UIDs of the messages to perform the copy operation. The ImapMessages in messages must be in this mailbox.
This method is useful for bulk operations. If you would like to copy a single message, use the ImapMessage.CopyTo method of the ImapMessage object.
Target Platforms: Microsoft .NET Framework 2.0