| Visual Basic (Declaration) | |
|---|---|
Public Function BeginSubscribe( _ ByVal state As Object _ ) As IAsyncResult | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim state As Object Dim value As IAsyncResult value = instance.BeginSubscribe(state) | |
| C# | |
|---|---|
public IAsyncResult BeginSubscribe( object state ) | |
| Managed Extensions for C++ | |
|---|---|
public: IAsyncResult* BeginSubscribe( Object* state ) | |
| C++/CLI | |
|---|---|
public: IAsyncResult^ BeginSubscribe( Object^ state ) | |
Parameters
- state
- User state information.
Return Value
An IAsyncResult that represents the asynchronous operation, which could still be pending.| 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.InvalidOperationException | BeginXXX method used without providing an EndXXX event handler. |
The Mailbox.BeginSubscribe method begins to asynchronously subscribe the mailbox. Upon completion, the Imap.EndSubscribe event is raised. Use of this method causes the IMAP SUBSCRIBE command to be sent to the server to subscribe the mailbox.
To get a list of subscribed mailboxes use
Imap.List("", "%", false);
Target Platforms: Microsoft .NET Framework 2.0