gws-gmail-send
Gmail helper for sending email via the gws CLI. Handles RFC 2822 formatting and base64 encoding automatically. Supports plain text, HTML, CC, and BCC.
Best use case
gws-gmail-send is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Gmail helper for sending email via the gws CLI. Handles RFC 2822 formatting and base64 encoding automatically. Supports plain text, HTML, CC, and BCC.
Teams using gws-gmail-send should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gws-gmail-send/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gws-gmail-send Compares
| Feature / Agent | gws-gmail-send | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Gmail helper for sending email via the gws CLI. Handles RFC 2822 formatting and base64 encoding automatically. Supports plain text, HTML, CC, and BCC.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Gmail Send (gws-gmail-send)
> **PREREQUISITE:** Read the `gws-shared` skill for auth, global flags, and security rules.
Send emails quickly using the `gws gmail +send` helper.
## Usage
```bash
gws gmail +send --to <EMAILS> --subject <SUBJECT> --body <TEXT>
```
## Flags
| Flag | Required | Description |
|------|----------|-------------|
| `--to` | ✓ | Recipient email address(es), comma-separated |
| `--subject` | ✓ | Email subject line |
| `--body` | ✓ | Email body (plain text, or HTML when `--html` is set) |
| `--cc` | — | CC email address(es), comma-separated |
| `--bcc` | — | BCC email address(es), comma-separated |
| `--html` | — | Treat `--body` as HTML content |
| `--dry-run` | — | Show the request that would be sent, without executing |
## Examples
```bash
# Simple plain-text email
gws gmail +send \
--to alice@example.com \
--subject 'Hello from gws' \
--body 'Hi Alice! This was sent by the gws CLI.'
# HTML email
gws gmail +send \
--to alice@example.com \
--subject 'Your report is ready' \
--body '<h1>Report Ready</h1><p>Click <a href="https://example.com">here</a> to view.</p>' \
--html
# With CC and BCC
gws gmail +send \
--to alice@example.com \
--subject 'Project Update' \
--body 'See the attached notes.' \
--cc bob@example.com \
--bcc manager@example.com
# Preview without sending
gws gmail +send \
--to alice@example.com \
--subject 'Test' \
--body 'Hello' \
--dry-run
# Send to multiple recipients
gws gmail +send \
--to 'alice@example.com,bob@example.com,carol@example.com' \
--subject 'Team announcement' \
--body 'The sprint review is tomorrow at 2pm.'
```
## Using the Raw API (for attachments)
The `+send` helper does not support file attachments. Use the raw `messages.send` API with a multipart MIME message for attachments:
```bash
# Base64-encode an RFC 2822 message with attachment
# (compose the MIME message first, then base64-encode it)
gws gmail users messages send \
--params '{"userId": "me"}' \
--json '{"raw": "<base64url-encoded-mime-message>"}'
```
> [!CAUTION]
> **This is a write command.** Always confirm with the user before sending an email. Use `--dry-run` to preview the request first.
## Tips
- Handles RFC 2822 formatting and base64url encoding automatically
- For threading (replies), use `gws gmail +reply` instead (see `gws-gmail` skill)
- For bulk email, loop over recipients and add delays to avoid rate limits
- Always include a meaningful subject — blank subjects are marked as spam
## See Also
- `gws-gmail` — Full Gmail API reference (threads, labels, filters, drafts)
- `gws-shared` — Authentication and global flagsRelated Skills
gws-gmail
Gmail skill for sending, reading, searching, labelling, and managing email via the gws CLI. Covers messages, threads, labels, drafts, filters, and inbox management.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
valyu
Search the live web and 36+ specialised data sources including SEC filings, PubMed, ChEMBL, clinical trials, FRED economic indicators, and patent databases. Use when current, authoritative, or paywalled data is required.
ui-ux-pro-max
AI-powered design intelligence with 67 UI styles, 161 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 15+ tech stacks. Generates complete design systems for any product type with industry-specific reasoning rules.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
shannon
Autonomous AI security pen testing. Executes real exploits against web applications to find SQL injection, XSS, SSRF, authentication flaws, and IDOR vulnerabilities. Reports only confirmed, reproducible findings — no false positives.
remotion
Create programmatic videos using React and Remotion. Translate natural language descriptions into working Remotion components for product demos, release announcements, explainer videos, and animated content.
planetscale
Design schemas and write queries for PlanetScale serverless MySQL using branch-based workflows. Ensures index coverage, avoids foreign key anti-patterns, and treats every schema change as a reviewable, reversible deploy request.
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).