1---
2name: send-email
3description: >
4 Use when the user wants to send an email, compose a message, or email someone.
5 Triggers: send email, email someone, compose email, write email, mail to, message to,
6 send a message, draft and send. Works with multiple accounts and recipients.
7---
8
9# Send Email Skill
10
11Send emails from the terminal using matcha's configured accounts.
12
13## How It Works
14
15Matcha has a `send` CLI subcommand that sends emails non-interactively:
16
17```
18matcha send --to <recipients> --subject <subject> --body <body> [flags]
19```
20
21## Available Flags
22
23| Flag | Description |
24|------|-------------|
25| `--to` | Recipient(s), comma-separated **(required)** |
26| `--subject` | Email subject **(required)** |
27| `--body` | Email body (Markdown supported). Use `"-"` to read from stdin |
28| `--from` | Sender account email (defaults to first configured account) |
29| `--cc` | CC recipient(s), comma-separated |
30| `--bcc` | BCC recipient(s), comma-separated |
31| `--attach` | Attachment file path (can be repeated for multiple files) |
32| `--signature` | Append default signature (default: true). Use `--signature=false` to disable |
33| `--sign-smime` | Sign with S/MIME (uses account default if not set) |
34| `--encrypt-smime` | Encrypt with S/MIME |
35| `--sign-pgp` | Sign with PGP (uses account default if not set) |
36
37## Instructions
38
391. **Always ask the user** for the recipient (`--to`) and subject (`--subject`) if not provided.
402. **Ask for the body** or compose it based on the user's intent. The body supports Markdown.
413. **Account selection**: If the user specifies which account to send from, use `--from <email>`. Otherwise omit it to use the default account.
424. **Attachments**: If the user mentions files to attach, use `--attach <path>` for each one. This flag can be repeated.
435. **Stdin body**: For long or multi-line bodies, pipe content into the command with `--body -`.
446. **Show the command** to the user before running it so they can confirm.
45
46## Examples
47
48Simple email:
49```bash
50matcha send --to alice@example.com --subject "Meeting tomorrow" --body "Hi Alice, can we meet at 2pm?"
51```
52
53From a specific account:
54```bash
55matcha send --from work@company.com --to client@example.com --subject "Invoice" --body "Please find the invoice attached." --attach ~/Documents/invoice.pdf
56```
57
58Multiple recipients with CC:
59```bash
60matcha send --to alice@example.com,bob@example.com --cc manager@example.com --subject "Project update" --body "The project is on track."
61```
62
63Long body from stdin:
64```bash
65cat ~/notes/report.md | matcha send --to team@example.com --subject "Weekly Report" --body -
66```
67
68Multiple attachments:
69```bash
70matcha send --to alice@example.com --subject "Files" --body "Here are the files." --attach report.pdf --attach data.csv
71```
72
73No signature:
74```bash
75matcha send --to alice@example.com --subject "Quick note" --body "Thanks!" --signature=false
76```
77
78## Account Configuration
79
80Accounts are configured in `~/.config/matcha/config.json`. The `--from` flag matches against both the login email and fetch email fields. If omitted, the first configured account is used.
81
82To list configured accounts, the user can check their matcha settings in the TUI.