namespace method

Future<NamespaceResponse?> namespace()

Retrieves the personal, other users' and shared namespaces of the server.

This requires the server to support the IMAP4 NAMESPACE extension and the client to be authenticated. Check ImapServerInfo.supportsNamespace to see if the NAMESPACE extension is supported.

Returns null when the server answered without a well-formed NAMESPACE response.

Implementation

Future<NamespaceResponse?> namespace() {
  final cmd = Command(
    'NAMESPACE',
    writeTimeout: defaultWriteTimeout,
    responseTimeout: defaultResponseTimeout,
  );

  return sendCommand(cmd, NamespaceParser());
}