| Visual Basic (Declaration) | |
|---|---|
Public Function Subscribe() As ImapResponse | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Mailbox Dim value As ImapResponse value = instance.Subscribe() | |
| C# | |
|---|---|
public ImapResponse Subscribe() | |
| Managed Extensions for C++ | |
|---|---|
public: ImapResponse* Subscribe(); | |
| C++/CLI | |
|---|---|
public: ImapResponse^ Subscribe(); | |
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. |
The Mailbox.Subscribe method attempts to subscribe the mailbox. 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