go-cms-mail

Implements site-scoped mail templates, asynchronous delivery jobs, and attachment handling for Go CMS.

Updated Jun 15, 2026
One-click install
npx skills add https://github.com/vernal96/go-cms --skill go-cms-mail-vernal96
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: go-cms-mail
Source: https://github.com/vernal96/go-cms/tree/main/.codex/skills/go-cms-mail
Command: npx skills add https://github.com/vernal96/go-cms --skill go-cms-mail-vernal96

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a mail feature into a modular Go CMS requires coordinating templating, site-scoped data, asynchronous job queues, SMTP transports, attachment authorization, and delivery history without leaking feature logic into the core kernel. This Skill provides the architectural rules and boundaries to implement that mail module correctly. ## Core Features & Use Cases - Site-scoped mail templates: Define templates with stable codes, typed data.* variables, backend-authoritative site.* variables, and per-site uniqueness so multiple sites reuse codes independently. - Immutable queued messages with jobs/outbox: Render once at queue time, persist an immutable Message plus durable outbox atomically, and let workers deliver with bounded retry and terminal-failure classification. - Attachment and permission model: Distinguish static, manual, site-field, automatic persistent, and transient spool attachments with correct authorization semantics for each source class. - Use Case: When adding a feedback-notification email to a CMS site, use this Skill to design the template CRUD, preview/send flow, SMTP transport alias configuration, delivery attempt history, and runtime-drain lifecycle so profile changes never corrupt in-flight mail. ## Quick Start Ask the AI to design the Go CMS mail module with site-scoped templates, an asynchronous send job, and transient attachment spooling following this Skill's rules.

Frequently Asked Questions about go-cms-mail

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement asynchronous email sending in a Go CMS?▼

Render an immutable Message snapshot at queue time, persist it with a durable outbox entry atomically, and let a worker claim the message, send through a logical transport alias, and record delivery attempts. Keep job payloads small, normally just the message ID.

How should mail templates handle site-scoped variables?▼

Templates belong to exactly one site with codes unique per site. Backend-authoritative site variables like site.domain and site.field.<key> come from the current SiteRuntime, while user input uses declared data.* variables validated through the core field type system.

Should mail rendering happen in the worker or at queue time?▼

Render at queue time, never in the worker. Enqueue an immutable rendered Message snapshot so later template or site edits cannot alter queued mail, and workers only load, claim, and deliver the persisted message.

How do I classify SMTP failures for retry logic?▼

Treat network timeouts and SMTP 4xx responses as retryable, and clear SMTP 5xx, missing attachments, and unknown transports as terminal. Bound retries with a configured max-attempts setting and persist each delivery attempt's outcome.

Can users attach arbitrary CMS files to outgoing mail by ID?▼

No. Manual file IDs are untrusted input validated against the actor's normal file permissions. Static template attachments are authorized at template save time, and transient uploads go to a private mail spool without creating CMS file records.

What features are explicitly out of scope for this mail module?▼

Template version history, preview fingerprints, newsletters, subscriber lists, SMS or messaging channels, open/click tracking, bounce webhooks, and inline CID images are all excluded unless explicitly requested.