GenServer managing a single IMAP connection.
Handles socket I/O, command dispatch, response accumulation, and connection state machine transitions.
Summary
Functions
Returns the server's advertised capabilities as a list of strings.
Returns a specification to start this module under a supervisor.
Returns mailbox metadata from the most recent SELECT or EXAMINE.
Returns the current IMAP connection state.
Functions
@spec capabilities(GenServer.server()) :: [String.t()]
Returns the server's advertised capabilities as a list of strings.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec mailbox_info(GenServer.server()) :: map() | nil
Returns mailbox metadata from the most recent SELECT or EXAMINE.
The returned map may include keys like :exists, :flags, :uid_validity,
and :uid_next. Returns nil if no mailbox is selected.
@spec state(GenServer.server()) :: :not_authenticated | :authenticated | :selected | :logout
Returns the current IMAP connection state.
Possible values: :not_authenticated, :authenticated, :selected, :logout.