Frontend (aka. primary interface) for interacting with an IMAP server.
Manages the full lifecycle of an IMAP session — from starting a connection (aka. server greeting) and authenticating, to selecting mailboxes and issuing arbitrary commands.
@typedoc """
:conn- A tuple with {socket_module, connection}.:capability- Server capabilities reported after connecting (aka. server greeting) or executing CAPABILITY command.:selected_mailbox- The currently selected mailbox, ornilif none is selected.:mailboxes- List of mailboxes retrieved from the server.:logged_in- Whether the session is currently authenticated. Defaults tofalse.:tag_number- Internal counter used to generate unique command tags(e.g. `1` → `"A001"`). Defaults to `0`.:debug- Whentrue, enables verbose logging of raw client/serverexchanges via `Logger`. Defaults to `false`.