chainmail draft create
Save a new message to the account's Drafts folder without sending it.
It takes send's account, recipient, subject, body and attachment options (not --draft, --dry-run or --idempotency-key); --account is required. The ref it prints is what draft update, draft send and draft delete take.
Usage
chainmail draft create [flags]
Examples
chainmail draft create --account work --to alice@example.com --subject "Notes" --body-file notes.md
# save a draft, then send it by the ref it prints
chainmail draft send "$(chainmail draft create --account work --to alice@example.com --subject Hi --body Hi --output json | jq -r .draft.ref)"
Flags
--account string the account whose Drafts folder keeps the draft (required)
--attach stringArray attach this file (repeatable)
--bcc stringArray a blind-copied recipient, kept out of the message itself (repeatable)
--body string the body as Markdown, or - to read it from stdin
--body-file string read the Markdown body from this file
--cc stringArray a copied recipient (repeatable)
--html-file string send this HTML file as the body, with --body as its text part when given
--inline stringArray show image file F inline where the body refers to NAME, as NAME=F (repeatable)
--no-signature leave out the account's signature
--subject string the subject line (required)
--text send the body as plain text instead of Markdown
--to stringArray a recipient, "Name <a@b>" or "a@b" (repeatable)
Global flags
--output string output format: json or table (default $CHAINMAIL_OUTPUT, then cli.toml, then table on a terminal, json otherwise)
--socket string daemon socket (default $CHAINMAIL_SOCKET, then cli.toml, then /run/chainmail/chainmail.sock)