Repository navigation
2.4.0 — Sender, drafts, and mailbox reliability
Mail.app CLI 2.4 improves sender selection, draft creation and sending, and repeatable mailbox cleanup.
Sending and drafts
- Select a configured sender address with
--from. Sending and draft creation check the account and sender before submitting or saving, preventing fallback to another account. - Create and send messages without the attachment-access error. File attachments use Mail’s native attachment operation, including Unicode filenames.
- Find Drafts through Mail’s account-owned special mailbox references, including localized and nested folders.
- Send supported plain-text drafts containing Mail’s standard compose headers. Rich-text, inline, threaded, signed, and encrypted drafts still require sending through Mail.
- Verify saved drafts directly through Mail instead of waiting for the Envelope Index. Send receipts distinguish submission from pending original-draft cleanup; do not resend a message already marked
submitted: true.
Mailbox cleanup and recovery
- Gmail Inbox archives use Mail’s native Archive control. Grant Accessibility access to the application running the CLI; the operation briefly opens a separate Mail window and stops if it cannot confirm the intended message.
- Verify final source, destination, and requested read state with bounded observation using
--settleand--verify-budget. - Recheck saved archive/move receipts with
messages reconcile receipt.jsonwithout repeating the mutation. - Use
--mark-read-on-skipwith--mark-readto explicitly mark an already-archived record read. - Synchronization requests target the selected account. Local counts and receipts describe Mail’s observed state, rather than guaranteeing server-side labels.
Reads and scans
- Body extraction reports diagnostics for images, nontext parts, partial files, and MIME alternative selection. Request alternative text with
--body-alternatives. - Save and resume cumulative mailbox traversal with
messages scan --checkpoint /absolute/path/history.json; use--restart-checkpointfor a fresh scan.
Install
Requires macOS and Go 1.25 or newer:
go install github.com/0xSMW/mail.app-cli/v2/cmd/mail-app-cli@v2.4.0