listMailboxes method
Lists all mailboxes in the given path
.
The path
default to "", meaning the currently selected mailbox, if there is none selected, then the root is used.
When recursive
is true, then all submailboxes are also listed.
When specified, mailboxPatterns
overrides the recursive
options and provides a list of mailbox patterns to include.
The selectionOptions
allows extended options to be supplied to the command.
The returnOptions
lists the extra results that should be returned by the extended list enabled servers.
The LIST command will set the serverInfo.pathSeparator
as a side-effect
Implementation
Future<List<Mailbox>> listMailboxes(
{String path = '""',
bool recursive = false,
List<String>? mailboxPatterns,
List<String>? selectionOptions,
List<ReturnOption>? returnOptions}) {
return listMailboxesByReferenceAndName(
path,
(recursive ? '*' : '%'),
mailboxPatterns,
selectionOptions,
returnOptions); // list all folders in that path
}