All of these are free. They do not send. Prefer --json if an agent will parse.

List

mailkit read --json
mailkit read --unread --max 10 --json
mailkit read -q "from:alice@example.com" --json
mailkit read -a you@proton.me --max 5 --json
Defaults: 20 messages. With no -q and no --unread, this is the inbox.
mailkit search "from:alice@example.com is:unread" --json
mailkit search "from:news.example.com" -a you@fastmail.com --json
Gmail accepts Gmail search syntax, including is:unread, newer_than:7d, older_than:30d, has:attachment, subject:, label:, in:inbox. Fastmail and Proton Mail only compile from:, from:(a OR b), -from:, in:inbox. Other operators raise UnsupportedQuery.

Open one message

mailkit show MESSAGE_ID --json
Adds body (plain text when available) and messageIdHeader. Gmail ids look like long hex. Proton Mail ids look like INBOX:12.

Thread (Gmail only)

mailkit thread THREAD_ID --json
threadId comes from a read/search summary. Fastmail and Proton Mail refuse this verb.

Typical agent loop

  1. mailkit auth doctor --json if credentials might be stale.
  2. mailkit read --unread --json --max 20
  3. mailkit show <id> --json for anything that needs the body.
  4. Do not send unless the human asked and confirmed.
Shapes: JSON output.