| Visual Basic (Declaration) | |
|---|---|
Public Function List( _ ByVal reference As String, _ ByVal searchTerm As String, _ ByVal unsubscribed As Boolean _ ) As Mailbox() | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Imap Dim reference As String Dim searchTerm As String Dim unsubscribed As Boolean Dim value() As Mailbox value = instance.List(reference, searchTerm, unsubscribed) | |
| C# | |
|---|---|
public Mailbox[] List( string reference, string searchTerm, bool unsubscribed ) | |
| Managed Extensions for C++ | |
|---|---|
public: Mailbox*[]* List( string* reference, string* searchTerm, bool unsubscribed ) | |
| C++/CLI | |
|---|---|
public: array<Mailbox^>^ List( String^ reference, String^ searchTerm, bool unsubscribed ) | |
Parameters
- reference
- The directory in which to execute the command.
- searchTerm
- The string to match.
- unsubscribed
- true if unsubscribed and subscribed mailboxes are to be returned by the listing, false if only subscribed are to be returned.
Return Value
An ImapResponse object representing 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 Imap.List method lists a subset of mailboxes found on the IMAP server and returns an array containing Mailbox objects that represent those mailboxes by using the IMAP LIST command. reference refers to the directory in which to execute the command. searchTerm checks against all mailboxes for matches, and may include wildcards. If unsubscribed is false, the result listing will only contain the Mailboxes the user is subscribed to (using the IMAP LSUB command). If true, the Imap.List command will return all unsubscribed and subscribed mailboxes which meet the criteria.
Target Platforms: Microsoft .NET Framework 2.0