maton google-mail message send

maton google-mail message send [flags]

Compose an RFC 5322 email and send it through the active google-mail connection. MIME structure (multipart/mixed when –attach is used), threading headers, and base64url encoding are handled automatically. To save without sending, use draft create.

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 message send --to alice@example.com --subject Hi --body 'Hello!'
$ maton google-mail message send --to a@b.com --subject Files --body 'see attached' -a a.pdf -a b.csv
$ maton google-mail message send --to a@b.com --subject HTML --body '<b>Hi</b>' --html

See also