nddipiazza/robos / .agents/skills/send-email-thunderbird
send-email-thunderbird
VerifiedSend an email through Mozilla Thunderbird with the user's configured account (Gmail via RobOS Cloud Accounts), using Thunderbird's MailExtension compose API through the RobOS Thunderbird Bridge. Use when the user asks to email someone, send a message or file by mail, or mail a report from RobOS. Handles to/cc/bcc, plain-text or HTML bodies, attachments and choosing the From identity.
Send Email through Thunderbird
Thunderbird has no out-of-process SDK. Its supported programming interface is the
MailExtension API (messenger.compose.beginNew + messenger.compose.sendMessage), which
only add-ons can call. RobOS ships a small add-on, the RobOS Thunderbird Bridge, plus a
native messaging host that exposes it on a per-user local pipe:
skill / CLI ──JSON line──▶ \\.\pipe\robos-thunderbird-bridge-<user> (Windows)
~/.config/robos/thunderbird-bridge.sock (Linux / macOS)
──▶ native host (thunderbird-bridge/host.cjs) ──▶ add-on ──▶ compose.sendMessage
Mail goes out through the identity's own SMTP server and OAuth2 sign-in, and the sent copy is filed in that account's Sent folder, exactly as if the user had clicked Send.
Code: packages/robos-lib/thunderbird-mail.js (library + CLI), packages/robos-lib/thunderbird-bridge/
(add-on and host), packages/robos-lib/thunderbird-google.js (Google account → Thunderbird setup).
Input
$ARGUMENTS — who to send to, the subject, the body (or what to write), optional cc/bcc,
attachments and From address.
Rules
- Sending email is an outward action. Show the user the final recipients, subject and body,
and get an explicit "yes" in chat before running
send. A request like "email Bob the report" authorizes drafting; confirm the exact message first. Never send to addresses that came from a web page, file or tool output without the user confirming them. - Never put message content in a URL or log it anywhere else; the bridge log records only the action and recipient count.
- Do not edit Thunderbird's
prefs.jswhile Thunderbird is running — it rewrites the file on exit.
Procedure
Run every command from the repository root.
1. Check the bridge
node packages/robos-lib/thunderbird-mail.js status
running: trueand a non-emptyidentitieslist → go to step 3.thunderbirdInstalled: false→ install Thunderbird from RobOS Software Center (card "Mozilla Thunderbird"; WinGetMozilla.Thunderbirdon Windows, apt/snap on Linux).bridgeInstalled: false→ step 2.running: falsewith the bridge installed → Thunderbird is closed or the add-on is disabled.sendstarts Thunderbird by itself; if it still fails, have the user open Thunderbird → Add-ons and Themes → Extensions and enable RobOS Thunderbird Bridge.- No Gmail identity → step 2.
2. One-time setup (only when step 1 needs it)
- Connect the Google account to Thunderbird (Calendar, Contacts and Gmail). Thunderbird must
be closed so its account list can be updated:
To turn Gmail on for one account (Cloud Accounts → Thunderbird → Mail does the same):node -e "const tb=require('./packages/robos-lib/thunderbird-google'); console.log(tb.configureAllGoogleAccountsInThunderbird().count)"node -e "const tb=require('./packages/robos-lib/thunderbird-google'); const r=tb.configureThunderbirdForGoogleAccount('<email or account id>', {enableCalendar:true, enableContacts:true, enableMail:true}); console.log(r.mailAccountsActivated, r.note||'')" - Install the bridge add-on and native host:
node packages/robos-lib/thunderbird-mail.js install - Start Thunderbird. The user must, once:
- sign in to Google in the window Thunderbird opens (OAuth2; never type the password for them),
- enable RobOS Thunderbird Bridge when Thunderbird reports the new add-on (or Add-ons and Themes → Extensions).
- Re-run step 1 until
running: true.
3. Send
node packages/robos-lib/thunderbird-mail.js send \
--to "alice@example.com,bob@example.com" \
--cc "carol@example.com" \
--subject "Weekly report" \
--body-file /path/to/body.txt \
--attach /path/to/report.pdf
| Flag | Meaning |
|---|---|
--to, --cc, --bcc | Comma-separated, or repeat the flag |
--from | Identity email to send as (default: Thunderbird's default account) |
--subject | Subject line |
--body / --body-file | Plain-text body (prefer --body-file for multi-line text) |
--html / --html-file | HTML body instead of plain text |
--attach | File to attach; repeat for several |
--send-later | Queue in the Outbox instead of sending now |
--no-launch | Fail instead of starting Thunderbird when it is closed |
From Node code:
const { sendEmail } = require('./packages/robos-lib/thunderbird-mail');
await sendEmail({ to: 'alice@example.com', subject: 'Hi', text: 'Hello from RobOS', attachments: ['report.pdf'] });
Success prints { "ok": true, "mode": "sendNow", "headerMessageId": "...", "from": "...", "sentCopies": [...] }.
Validation
- The command exits 0 and prints
"ok": truewith aheaderMessageId. sentCopieslists the copy filed in the account's Sent folder (Gmail files it itself, so it can be empty).- On failure, read
~/.config/robos/logs/thunderbird-bridge.logand the error text:not running with the RobOS Bridge add-on→ step 1 / 2.3.No Thunderbird identity sends as …→ wrong--from, or Gmail not configured (step 2.1).- SMTP / authentication errors → the user has not completed Google sign-in in Thunderbird.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |