Retrieves a list of all available and selectable mailboxes on the server.

Namespace: S22.Imap
Assembly: S22.Imap (in S22.Imap.dll) Version: 3.6.0.0 (3.6.0.0)

Syntax

C#
public IEnumerable<string> ListMailboxes()

Return Value

An enumerable collection of the names of all available and selectable mailboxes.

Implements

IImapClient..::..ListMailboxes()()()()

Remarks

The mailbox name "INBOX" is a special name reserved to mean "the primary mailbox for this user on this server".

Exceptions

ExceptionCondition
S22.Imap..::..BadServerResponseExceptionThe list of mailboxes could not be retrieved. The message property of the exception contains the error message returned by the server.
System..::..ObjectDisposedExceptionThe ImapClient object has been disposed.
System.IO..::..IOExceptionThere was a failure writing to or reading from the network.
S22.Imap..::..NotAuthenticatedExceptionThe method was called in non-authenticated state, i.e. before logging in.

See Also