PowerTCP Mail for .NET
Copy(ImapMessage,ImapMessage,Mailbox) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Mailbox Class > Copy Method : Copy(ImapMessage,ImapMessage,Mailbox) Method




first
An ImapMessage object representing the first message in the range to copy.
last
An ImapMessage object representing the last message in the range to copy.
destination
The name of the destination mailbox.
Copies the specified range of messages to the specified mailbox.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Copy( _
   ByVal first As ImapMessage, _
   ByVal last As ImapMessage, _
   ByVal destination As Mailbox _
) As ImapResponse
Visual Basic (Usage)Copy Code
Dim instance As Mailbox
Dim first As ImapMessage
Dim last As ImapMessage
Dim destination As Mailbox
Dim value As ImapResponse
 
value = instance.Copy(first, last, destination)
C# 
public ImapResponse Copy( 
   ImapMessage first,
   ImapMessage last,
   Mailbox destination
)
Managed Extensions for C++ 
public: ImapResponse* Copy( 
   ImapMessage* first,
   ImapMessage* last,
   Mailbox* destination
) 
C++/CLI 
public:
ImapResponse^ Copy( 
   ImapMessage^ first,
   ImapMessage^ last,
   Mailbox^ destination
) 

Parameters

first
An ImapMessage object representing the first message in the range to copy.
last
An ImapMessage object representing the last message in the range to copy.
destination
The name of the destination mailbox.

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.Copy method copies the messages contained within the range specified by first and last. This command results in an IMAP COPY command being issued to the server. 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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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