Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Send emails via Gmail using the gws CLI with support for HTML, CC/BCC, file attachments, and send-as aliases.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: gws-gmail-send3description: "Gmail: Send an email."4metadata:5version: 0.22.56openclaw:7category: "productivity"8requires:9bins:10- gws11cliHelp: "gws gmail +send --help"12---1314# gmail +send1516> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.1718Send an email1920## Usage2122```bash23gws gmail +send --to <EMAILS> --subject <SUBJECT> --body <TEXT>24```2526## Flags2728| Flag | Required | Default | Description |29|------|----------|---------|-------------|30| `--to` | ✓ | — | Recipient email address(es), comma-separated |31| `--subject` | ✓ | — | Email subject |32| `--body` | ✓ | — | Email body (plain text, or HTML with --html) |33| `--from` | — | — | Sender address (for send-as/alias; omit to use account default) |34| `--attach` | — | — | Attach a file (can be specified multiple times) |35| `--cc` | — | — | CC email address(es), comma-separated |36| `--bcc` | — | — | BCC email address(es), comma-separated |37| `--html` | — | — | Treat --body as HTML content (default is plain text) |38| `--dry-run` | — | — | Show the request that would be sent without executing it |39| `--draft` | — | — | Save as draft instead of sending |4041## Examples4243```bash44gws gmail +send --to [email protected] --subject 'Hello' --body 'Hi Alice!'45gws gmail +send --to [email protected] --subject 'Hello' --body 'Hi!' --cc [email protected]46gws gmail +send --to [email protected] --subject 'Hello' --body '<b>Bold</b> text' --html47gws gmail +send --to [email protected] --subject 'Hello' --body 'Hi!' --from [email protected]48gws gmail +send --to [email protected] --subject 'Report' --body 'See attached' -a report.pdf49gws gmail +send --to [email protected] --subject 'Files' --body 'Two files' -a a.pdf -a b.csv50gws gmail +send --to [email protected] --subject 'Hello' --body 'Hi!' --draft51```5253## Tips5455- Handles RFC 5322 formatting, MIME encoding, and base64 automatically.56- Use --from to send from a configured send-as alias instead of your primary address.57- Use -a/--attach to add file attachments. Can be specified multiple times. Total size limit: 25MB.58- With --html, use fragment tags (<p>, <b>, <a>, <br>, etc.) — no <html>/<body> wrapper needed.59- Use --draft to save the message as a draft instead of sending it immediately.6061> [!CAUTION]62> This is a **write** command — confirm with the user before executing.6364## See Also6566- [gws-shared](../gws-shared/SKILL.md) — Global flags and auth67- [gws-gmail](../gws-gmail/SKILL.md) — All send, read, and manage email commands68