55<h1 align =" center " >fastmail-cli</h1 >
66
77<p align =" center " >
8- <strong >Read-only email access for AI agents via JMAP.</strong >
8+ <strong >Read-only email access for AI agents via JMAP, and draft responses .</strong >
99</p >
1010
1111<p align =" center " >
@@ -38,7 +38,7 @@ uvx fastmail-cli help
3838## Setup
3939
4040``` bash
41- export FASTMAIL_READONLY_API_TOKEN =" fmu1-..." # from Fastmail Settings → Integrations
41+ export FASTMAIL_API_TOKEN =" fmu1-..." # from Fastmail Settings → Integrations
4242```
4343
4444## Usage
@@ -50,6 +50,37 @@ fastmail-cli email.get --ids '["M123"]' # get by ID
5050fastmail-cli mailbox.query # list mailboxes
5151```
5252
53+ ### Create Drafts (Safe for AI Agents)
54+
55+ ``` bash
56+ # Create a draft - human reviews in Fastmail UI before sending
57+ fastmail-cli email.draft \
58+ --to " recipient@example.com" \
59+ --subject " Re: Your question" \
60+ --body " Here's the response..."
61+
62+ # Draft with body from file
63+ fastmail-cli email.draft \
64+ --to " user@example.com" \
65+ --subject " Report" \
66+ --body @report.txt
67+ ```
68+
69+ ### Draft Replies to Existing Emails
70+
71+ ``` bash
72+ # Reply to an email (auto-threads, auto-sets subject)
73+ fastmail-cli email.draft-reply \
74+ --id " M12345" \
75+ --body " Thanks for reaching out..."
76+
77+ # Reply-all to include all original recipients
78+ fastmail-cli email.draft-reply \
79+ --id " M12345" \
80+ --body " Replying to everyone..." \
81+ --reply-all
82+ ```
83+
5384All output is JSON with ` ok ` , ` command ` , ` meta ` , and ` data ` /` error ` fields.
5485
5586## Required Reading
0 commit comments