| Visual Basic (Declaration) | |
|---|---|
Public Function BeginCopyTo( _ ByVal destination As Mailbox, _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As ImapMessage Dim destination As Mailbox Dim state As Object Dim value As IAsyncResult value = instance.BeginCopyTo(destination, state) | |
| C# | |
|---|---|
public IAsyncResult BeginCopyTo( Mailbox destination, object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginCopyTo( Mailbox* destination, Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginCopyTo( Mailbox^ destination, Object^ state ) | |
Parameters
- destination
- The name of the destination mailbox.
- state
- User state information.
Return Value
An IAsyncResult that represents the asynchronous operation, which could still be pending.| Exception | Description |
|---|---|
| System.InvalidOperationException | BeginXXX method used without providing an EndXXX event handler. |
| Dart.PowerTCP.Mail.ProtocolException | Bad IMAP protocol response received from server. |
| System.Net.Sockets.SocketException | The requested address is not valid in its context. |
The ImapMessage.BeginCopyTo method begins to asynchronously copy the message to the mailbox specified by destination using the IMAP COPY command. Upon completion, the Imap.EndCopy event is raised. The UID of the message is used when executing the IMAP COPY command.
Target Platforms: Microsoft .NET Framework 2.0