email-smtp-send
Send emails through SMTP with optional local attachments and optional IMAP APPEND sync to Sent mailbox. Use when tasks need reliable outbound email delivery, attachment sending, SMTP connectivity checks, or cross-client sent-mail visibility (for example appending to "Sent Items" after SMTP send).
What this skill does
# Email SMTP Send ## Core Goal - Send outbound email via SMTP with env-configured credentials. - Attach local files into MIME email payload when requested. - Optionally append the sent message to IMAP sent mailbox for cross-client visibility. - Validate SMTP and sent-sync configuration before delivery. - Return machine-readable JSON status/error output. ## Workflow 1. Configure SMTP env vars (see `references/env.md` and `assets/config.example.env`). 2. Optional: configure IMAP sent-sync env vars and install `imapclient` when sync is enabled. 3. Validate configuration: ```bash python3 scripts/smtp_send.py check-config ``` 4. Send one email: ```bash python3 scripts/smtp_send.py send \ --to [email protected] \ --subject "SMTP test" \ --body "Hello from email-smtp-send" ``` 5. Send with attachments: ```bash python3 scripts/smtp_send.py send \ --to [email protected] \ --subject "Package delivery" \ --body "See attachments." \ --attach ./report.pdf \ --attach ./appendix.xlsx ``` 6. Send and sync to sent mailbox: ```bash python3 scripts/smtp_send.py send \ --to [email protected] \ --subject "Synced send" \ --body "This message will be appended to Sent Items." \ --sync-sent \ --sent-mailbox "Sent Items" ``` ## Output Contract - `check-config` prints sanitized SMTP config + defaults + sent-sync config JSON. - `send` success prints one `type=status` JSON object containing: - `event=smtp_sent` - sender, recipient summary, subject, SMTP host/port - `message_id` - `attachment_count` and `attachments[]` metadata - `sent_sync` object with `enabled`, `required`, `appended`, and sync metadata/error - `send` failures print `type=error` JSON to stderr with one of: - `event=smtp_send_invalid_args` - `event=smtp_send_failed` - `event=smtp_sent_sync_failed` (only when sync is required and sync fails) ## Parameters - `send --to`: required recipient, repeatable or comma-separated. - `send --cc`: optional CC recipients. - `send --bcc`: optional BCC recipients. - `send --subject`: optional subject (defaults from env). - `send --body`: optional body (defaults from env). - `send --content-type`: `plain` or `html`. - `send --from`: optional sender override. - `send --attach`: optional local attachment path, repeatable or comma-separated. - `send --max-attachment-bytes`: max bytes allowed per attachment. - `send --message-id`: optional Message-ID header. - `send --in-reply-to`: optional In-Reply-To header. - `send --references`: optional References header. - `send --sync-sent|--no-sync-sent`: force-enable/disable IMAP sent sync for this send. - `send --sent-mailbox`: override sent mailbox. - `send --sent-flags`: IMAP APPEND flags, comma-separated (default `\Seen`). - `send --sent-sync-required`: return non-zero if SMTP succeeds but sent sync fails. Environment defaults: - `SMTP_HOST`, `SMTP_PORT`, `SMTP_SSL`, `SMTP_STARTTLS` - `SMTP_USERNAME`, `SMTP_PASSWORD`, `SMTP_FROM`, `SMTP_CONNECT_TIMEOUT` - `SMTP_SUBJECT`, `SMTP_BODY`, `SMTP_CONTENT_TYPE` - `SMTP_MAX_ATTACHMENT_BYTES` - `SMTP_SYNC_SENT`, `SMTP_SYNC_SENT_REQUIRED` - `SMTP_SENT_IMAP_HOST`, `SMTP_SENT_IMAP_PORT`, `SMTP_SENT_IMAP_SSL` - `SMTP_SENT_IMAP_USERNAME`, `SMTP_SENT_IMAP_PASSWORD` - `SMTP_SENT_IMAP_MAILBOX`, `SMTP_SENT_IMAP_FLAGS`, `SMTP_SENT_IMAP_CONNECT_TIMEOUT` - compatibility fallbacks: `IMAP_HOST`, `IMAP_PORT`, `IMAP_SSL`, `IMAP_USERNAME`, `IMAP_PASSWORD`, `IMAP_CONNECT_TIMEOUT` ## Dependency - Sent-sync mode requires `imapclient`: ```bash python3 -m pip install imapclient ``` ## Error Handling - Invalid env config exits with code `2`. - Send failure exits with code `1`. - If sync is required (`--sent-sync-required` or `SMTP_SYNC_SENT_REQUIRED=true`), sync failure exits with code `1`. ## References - `references/env.md` ## Assets - `assets/config.example.env` ## Scripts - `scripts/smtp_send.py`
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.