email-imap-append
Compose unsent email drafts (with optional attachments) and append them to an IMAP mailbox via APPEND (typically Drafts) without sending. Use when tasks need to save draft messages for human review, prefill reply templates, stage outbound content inside mailbox folders before manual send, or prepare draft attachments in mailbox-native format.
What this skill does
# Email IMAP Append ## Core Goal - Build RFC 5322 draft messages with subject/body/recipients. - Attach local files into draft MIME payload when requested. - Append the draft MIME into an IMAP mailbox using `APPEND`. - Set draft flags (default `\\Draft`) and keep the message unsent. - Return machine-readable JSON with append status and server response metadata. ## Workflow 1. Configure IMAP env vars (see `references/env.md` and `assets/config.example.env`). 2. Validate config and defaults: ```bash python3 scripts/imap_append.py check-config ``` 3. Append one draft email to Drafts mailbox: ```bash python3 scripts/imap_append.py append-draft \ --to [email protected] \ --subject "Draft: quarterly update" \ --body "Please review this draft before sending." ``` 4. Append HTML draft with explicit mailbox and flags: ```bash python3 scripts/imap_append.py append-draft \ --mailbox "Drafts" \ --flags "\\Draft,\\Seen" \ --content-type html \ --subject "Draft: release note" \ --body "<p>Release note draft for approval.</p>" ``` 5. Append draft with attachments: ```bash python3 scripts/imap_append.py append-draft \ --to [email protected] \ --subject "Draft: WG2 package" \ --body "See attached draft tables." \ --attach ./wg2-table.xlsx \ --attach ./notes.docx ``` ## Output Contract - `check-config` prints sanitized IMAP + append defaults as JSON. - `append-draft` success prints one `type=status` JSON object containing: - `event=imap_draft_appended` - `account`, `mailbox`, `subject`, `message_id` - recipient lists and counts - `flags` - `attachment_count` and `attachments[]` metadata - `append_uidvalidity` and `append_uid` when server returns `APPENDUID` - `append-draft` failure prints `type=error` JSON to stderr with `event=imap_append_failed`. ## Parameters - `append-draft --to`: optional recipient, repeatable or comma-separated. - `append-draft --cc`: optional CC recipient list. - `append-draft --bcc`: optional BCC recipient list. - `append-draft --subject`: optional subject (defaults from env). - `append-draft --body`: optional body (defaults from env). - `append-draft --content-type`: `plain` or `html`. - `append-draft --from`: optional sender override. - `append-draft --mailbox`: target mailbox (default `IMAP_APPEND_MAILBOX`, then `IMAP_MAILBOX`, then `Drafts`). - `append-draft --flags`: append flags, comma-separated (default `\\Draft`). - `append-draft --message-id`: explicit Message-ID header. - `append-draft --in-reply-to`: optional In-Reply-To header. - `append-draft --references`: optional References header. - `append-draft --attach`: local attachment path, repeatable or comma-separated. - `append-draft --max-attachment-bytes`: max bytes allowed per attachment. ## Required Environment - `IMAP_HOST` - `IMAP_USERNAME` - `IMAP_PASSWORD` Optional defaults: - `IMAP_NAME` - `IMAP_PORT` - `IMAP_SSL` - `IMAP_CONNECT_TIMEOUT` - `IMAP_MAILBOX` - `IMAP_APPEND_MAILBOX` - `IMAP_APPEND_FLAGS` - `IMAP_APPEND_FROM` - `IMAP_APPEND_TO` - `IMAP_APPEND_CC` - `IMAP_APPEND_BCC` - `IMAP_APPEND_SUBJECT` - `IMAP_APPEND_BODY` - `IMAP_APPEND_CONTENT_TYPE` - `IMAP_APPEND_MAX_ATTACHMENT_BYTES` ## References - `references/env.md` ## Assets - `assets/config.example.env` ## Scripts - `scripts/imap_append.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.