Plover.Connection (plover v0.6.0)

Copy Markdown View Source

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

capabilities(conn)

@spec capabilities(GenServer.server()) :: [String.t()]

Returns the server's advertised capabilities as a list of strings.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

mailbox_info(conn)

@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.

state(conn)

@spec state(GenServer.server()) ::
  :not_authenticated | :authenticated | :selected | :logout

Returns the current IMAP connection state.

Possible values: :not_authenticated, :authenticated, :selected, :logout.