Generated from
gog schema --json. Do not edit this page by hand; runmake docs-commands.
Update a draft
gog gmail (mail,email) drafts (draft) update (edit,set) <draftId> [flags]| Flag | Type | Default | Help |
|---|---|---|---|
--access-token |
string |
Use provided access token directly (bypasses stored refresh tokens; token expires in ~1h) | |
-a--account--acct |
string |
Account email, alias, or auto for authenticated Google API commands | |
--attach |
[]string |
Attachment file path (repeatable). Replaces existing attachments; omit to preserve them, or use --clear-attachments to remove all. | |
--auto-from-addressed-alias |
bool |
When --from is omitted, reply from the verified send-as alias addressed by the original message | |
--bcc |
string |
BCC recipients (comma-separated; omit to keep existing, empty to clear) | |
--body |
string |
Body (plain text; required unless --body-html is set) | |
--body-file |
string |
Body file path (plain text; '-' for stdin) | |
--body-html |
string |
Body (HTML; optional) | |
--body-html-file |
string |
HTML body file path ('-' for stdin) | |
--cc |
string |
CC recipients (comma-separated; omit to keep existing, empty to clear) | |
--clear-attachments |
bool |
Remove all attachments from the draft. By default, omitting --attach preserves the draft's existing attachments. | |
--clear-reply-context |
bool |
Strip In-Reply-To/References from the draft, making it a standalone message. By default an update preserves the draft's existing reply headers. | |
--client |
string |
OAuth client name (selects stored credentials + token bucket) | |
--color |
string |
auto | Color output: auto|always|never |
--disable-commands |
string |
Comma-separated list of disabled commands; dot paths allowed | |
-n--dry-run--dryrun--noop--preview |
bool |
Do not make changes; print intended actions and exit successfully | |
--enable-commands |
string |
Comma-separated list of enabled command prefixes; dot paths allowed (restricts CLI) | |
--enable-commands-exact |
string |
Comma-separated list of exact enabled commands; dot paths allowed and parent commands do not enable children | |
-y--force--assume-yes--yes |
bool |
Skip confirmations for destructive commands | |
--from |
string |
Send from this email address (must be a verified send-as alias) | |
--gmail-no-send |
bool |
false | Block Gmail send operations (agent safety) |
-h--help |
kong.helpFlag |
Show context-sensitive help. | |
--home |
string |
Override gogcli config/data/state/cache root (equivalent to GOG_HOME) | |
--html-from-text |
bool |
When only a plain body is given, also send it as HTML so Gmail web reflows paragraphs instead of breaking lines about every 70 characters | |
-j--json--machine |
bool |
false | Output JSON to stdout (best for scripting) |
--no-input--non-interactive--noninteractive |
bool |
Never prompt; fail instead (useful for CI) | |
-p--plain--tsv |
bool |
false | Output stable, parseable text to stdout (TSV; no colors) |
--quota-project |
string |
Google Cloud project to bill for API usage (sent as X-Goog-User-Project; some APIs require it with --access-token or ADC) | |
--quote |
bool |
Include quoted original message in reply | |
--raw-file |
string |
Replace the entire draft with an exact RFC822 message file, or '-' for stdin (cannot be combined with compose flags) | |
--readonly |
bool |
false | Block mutating API requests at runtime; auth add also requests read-only OAuth scopes |
--reply-all |
bool |
Auto-populate recipients from original message (requires --reply-to-message-id or --thread-id) | |
--reply-to |
string |
Reply-To header address | |
--reply-to-message-id |
string |
Reply to Gmail message ID (sets In-Reply-To/References and thread) | |
--results-only |
bool |
In JSON mode, emit only the primary result (drops envelope fields like nextPageToken) | |
--select--pick--project |
string |
In JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands. | |
--signature |
bool |
Append the Gmail signature from the active send-as address | |
--signature-file |
string |
Append a local signature file (plain text or HTML) | |
--signature-from |
string |
Append the Gmail signature from this send-as email address | |
--subject |
string |
Subject (required) | |
--thread-id |
string |
Reply within a Gmail thread (raw mode sets only the thread ID); overrides the draft's existing thread | |
--to |
*string |
Recipients (comma-separated; omit to keep existing) | |
-v--verbose |
bool |
Enable verbose logging | |
--version |
kong.VersionFlag |
Print version and exit | |
--wrap-untrusted |
bool |
false | In JSON/raw output, wrap fetched text fields in external untrusted-content markers |