maton google-mail draft create

maton google-mail draft create [flags]

Compose an RFC 5322 email and save it as a draft via users.drafts.create. The same compose pipeline as message send is used (MIME, base64url, attachments) — only the destination endpoint differs. Use draft send to dispatch the saved draft.

Options

-a, --attach <stringArray>
Attach a file (repeatable)
--bcc <string>
BCC email address(es), comma-separated
-b, --body <string>
Email body — plain text (or HTML with --html) (required)
--cc <string>
CC email address(es), comma-separated
--connection <string>
Connection ID to route through (Maton-Connection header)
--dry-run
Print the request that would be sent without executing it
--format <string>
Output format: 'json' (default) or 'text' on supported commands
--from <string>
Sender address (for send-as alias; omit to use account default)
--html
Treat --body as HTML (default plain text)
-q, --jq <expression>
Filter JSON output using a jq expression
--paginate
Follow next_cursor and concatenate all pages (list commands only)
--subject <string>
Email subject (required)
--template <string>
Format JSON output using a Go template; see "maton help formatting"
--to <string>
Recipient email address(es), comma-separated (required)

Options inherited from parent commands

-p, --profile <string>
Profile to use for this invocation (overrides the active profile; also reads MATON_PROFILE)

Examples

$ maton google-mail draft create --to alice@example.com --subject Hi --body 'Hello!'
$ maton google-mail draft create --to a@b.com --subject Files --body 'see attached' -a a.pdf
$ maton google-mail draft create --to a@b.com --subject HTML --body '<b>Hi</b>' --html

See also