maton outlook message send

maton outlook message send [<draft-id>] [flags]

Send a message. Without a positional draft ID, builds a Microsoft Graph message object from the compose flags and posts to /me/sendMail. With a positional draft ID, sends an existing draft (POST /me/messages/{id}/send) and ignores the compose flags.

Options

--bcc <string>
BCC recipients, comma-separated
-t, --body <string>
Email body content (one of --body, --body-file required when composing)
-F, --body-file <string>
Read message body from a file path (or '-' for stdin)
--cc <string>
CC recipients, comma-separated
--connection <string>
Connection ID to route through (Maton-Connection header)
--dry-run
Print the request that would be sent without executing it
--html
Send body as HTML (default: plain text)
-q, --jq <expression>
Filter JSON output using a jq expression
--json
Output raw JSON
--no-save
Do not save the sent message to Sent Items (compose mode only)
--paginate
Follow next_cursor and concatenate all pages (list commands only)
--subject <string>
Email subject line (required when composing)
--template <string>
Format JSON output using a Go template; see "maton help formatting"
--to <string>
Recipient email(s), comma-separated (required when composing)

Options inherited from parent commands

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

Examples

$ maton outlook message send --to alice@example.com --subject "Hi" --body "hello"
$ maton outlook message send --to a@b.com,c@d.com --cc boss@b.com --subject Update --body "..."
$ maton outlook message send --to a@b.com --subject "Report" --body "<p>see attached</p>" --html
$ maton outlook message send --to a@b.com --subject draft --body-file ./body.md
$ maton outlook message send --to a@b.com --subject draft --body "..." --no-save
$ maton outlook message send AAMkAGI...   # send an existing draft

See also