Reading mail
All reads go to your mail server live, and none of them mark messages as read.
List a folder#
fob-email emails list # newest 50 in INBOX
fob-email emails list --unseen --limit 20 # newest 20 unread
fob-email emails list --folder Archive
fob-email emails list --fields id,from,subject,date,attach
ID FROM SUBJECT DATE
-----------------------------------------------------------------------------------
1423 [email protected] Invoice INV-2291 for September 2026-10-01 14:42:44
1419 [email protected] Your statement is ready 2026-09-30 11:32:10
1417 [email protected] Remittance advice: payment 88213 2026-09-29 20:10:00
- Messages come newest first, with dates in your computer's time zone.
--limitsets how many (default 50). There's no paging: to see older messages, raise--limitor usesearchwith--since. --fieldspicks columns fromid,from,to,subject,date,flagsandattach.toshows the first recipient, andattachshows*when a message has attachments. Empty cells show—.- When the list fills
--limit, a note(showing 50; raise --limit for more)prints on stderr.
Message IDs#
The ID column is the message's number within that folder (its IMAP UID). Keep two rules in mind:
- Pass the same
--folderwhen you use the ID:fob-email emails show 1423 --folder Archive. The default folder isINBOX. - A message gets a new ID when it moves to another folder.
Search#
fob-email emails search "invoice" # in headers and body
fob-email emails search --from [email protected]
fob-email emails search --subject statement --since 2026-09-01
fob-email emails search "overdue" --folder Archive --limit 100
The query matches anywhere in the message. --from, --subject and --since (a YYYY-MM-DD date, inclusive) narrow it further, and all conditions must match. Matching is done by your mail server: it finds words and addresses, not meaning.
Open a message#
fob-email emails show 1423
--- Email #1423 ---
From: Vendor Billing <[email protected]>
To: [email protected]
Subject: Invoice INV-2291 for September
Date: 2026-10-01T09:12:44.000Z
Msg-Id: <[email protected]>
Hi, please find attached your invoice for September.
--- Attachments ---
INV-2291.pdf (application/pdf, 84.2 KB)
show prints the plain-text body, and the date in UTC. With --json you also get the HTML body and attachment details. See Output and scripting.
Download attachments#
fob-email emails download 1423 -o ./invoices
Every attachment is saved into the -o folder (default: the current folder), which is created if needed. A file with the same name is overwritten. Each saved file prints Wrote <path> on stderr, and --json prints the list of saved files on stdout.
Conversations#
fob-email threads list --limit 20
fob-email threads show 1423
LATEST MSGS SUBJECT DATE
-------------------------------------------------------
1423 3 Re: Invoice INV-2291 2026-10-01 14:42:44
1402 1 Contract renewal 2026-09-27 15:30:00
threads listgroups the folder's recent messages into conversations, most recent activity first.LATESTis the ID of the newest message in each.threads show <id>takes any message ID in the conversation and prints the whole conversation, oldest first.- Gmail and servers that provide conversation IDs group exactly. On other servers fob-email follows reply headers, looking back over the folder's most recent 500 messages.
- A conversation is read from one folder (default
INBOX). Only messages in that folder are included, so your own replies, which sit in your Sent folder, usually don't appear.
Folders#
fob-email folders list
PATH SPECIAL SUBSCRIBED
--------------------------------------
INBOX — yes
[Gmail]/Drafts \Drafts yes
[Gmail]/Sent Mail \Sent yes
Invoices/2026 — yes
PATH is the name to use with --folder. SPECIAL marks your provider's Drafts, Sent, Trash, Junk and All Mail folders. Folder names with spaces or brackets need quotes, for example --folder "[Gmail]/Sent Mail".