Hunny Software Library Reference

Imap4Client.List Method 

Sends a LIST command.

[Visual Basic]
Public Sub List( _
   ByVal referenceName As String, _
   ByVal mailboxNamePattern As String _
)
[C#]
public void List(
   string referenceName,
   string mailboxNamePattern
);

Parameters

referenceName
The context in which the mailbox name is interpreted.
mailboxNamePattern
The mailbox name or wildcard pattern.

Remarks

The LIST command requests the server to return a list of all names that match a specified pattern. The server responds by sending zero or more LIST responses.

Note: The names returned by the server are not necessarily the names of valid mailboxes. Some servers will list all the files in a directory whether or not those files are valid mailbox files.

Warning: The number of responses returned by the server could potentially be very large if wildcards are used, especially when the "*" wildcard is used. Developers are urged to use the list command carefully, and to prefer the "%" wildcard over the "*" wildcard.

Exceptions

Exception TypeCondition
ExceptionIf a network or protocol error occurs.

See Also

Imap4Client Class | Hunny.Mail Namespace | ListResponse | LIST command in the IMAP4 specification