Labsco
googleworkspace logo

gws-gmail-send

โœ“ Officialโ˜… 29,425

by Google ยท part of googleworkspace/cli

Gmail: Send an email.

๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup
๐Ÿงฐ Not standalone. This skill ships with googleworkspace/cli and only works together with that tool โ€” install the tool first, then add this skill.

This is the playbook your agent receives when the skill activates โ€” you don't need to read it to use the skill, but it's here to audit before installing.

gmail +send

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Send an email

Flags

FlagRequiredDefaultDescription
--toโœ“โ€”Recipient email address(es), comma-separated
--subjectโœ“โ€”Email subject
--bodyโœ“โ€”Email body (plain text, or HTML with --html)
--fromโ€”โ€”Sender address (for send-as/alias; omit to use account default)
--attachโ€”โ€”Attach a file (can be specified multiple times)
--ccโ€”โ€”CC email address(es), comma-separated
--bccโ€”โ€”BCC email address(es), comma-separated
--htmlโ€”โ€”Treat --body as HTML content (default is plain text)
--dry-runโ€”โ€”Show the request that would be sent without executing it
--draftโ€”โ€”Save as draft instead of sending

Examples

gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi Alice!'
gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --cc bob@example.com
gws gmail +send --to alice@example.com --subject 'Hello' --body '<b>Bold</b> text' --html
gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --from alias@example.com
gws gmail +send --to alice@example.com --subject 'Report' --body 'See attached' -a report.pdf
gws gmail +send --to alice@example.com --subject 'Files' --body 'Two files' -a a.pdf -a b.csv
gws gmail +send --to alice@example.com --subject 'Hello' --body 'Hi!' --draft

Tips

[!CAUTION] This is a write command โ€” confirm with the user before executing.

See Also

  • gws-shared โ€” Global flags and auth
  • gws-gmail โ€” All send, read, and manage email commands