PowerTCP Mail for .NET
List Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Imap Class : List Method




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.
Lists a subset of mailboxes found on the IMAP server.

Syntax

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.

Exceptions

ExceptionDescription
Dart.PowerTCP.Mail.ProtocolExceptionBad IMAP protocol response received from server.
System.Net.Sockets.SocketExceptionThe requested address is not valid in its context.

Remarks

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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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