transactional-email

Implements transactional email sending with provider tokens, templates, and delivery tracking.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/brandonarbini/arbini.family --skill transactional-email-brandonarbini
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: transactional-email
Source: https://github.com/brandonarbini/arbini.family/tree/main/.agents/skills/transactional-email
Command: npx skills add https://github.com/brandonarbini/arbini.family --skill transactional-email-brandonarbini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Transactional emails often fail silently: optional provider tokens turn sends into no-ops, development runs mail real users, plaintext parts go missing, and nobody can answer whether a recipient actually got the message. This Skill defines a safe pattern for wiring providers like Postmark, Resend, SendGrid, or SES so every environment sends through a sandbox key and every send is recorded. ## Core Features & Use Cases - Required provider token: Declares the provider API token as mandatory in lib/env/server.ts with no .optional(), so a misconfigured deploy fails fast instead of silently skipping sends. - Sandbox keys outside production: Routes development, CI, and preview environments through provider sandbox keys that accept messages without delivering them to real users. - Dual-part templates with render tests: Renders HTML and plaintext from one template and tests subject, key links, and non-empty plaintext, previewable via pnpm dev:email. - Delivery recording: Writes one row per intended send with the provider message id and a terminal status, turning delivery questions into a query. - Use Case: When adding a password-reset email, you configure the Postmark sandbox token, define the verified From address as a code constant, render both parts from one template, and record each send so support can confirm delivery. ## Quick Start Add a new transactional email for user invitations following the transactional email conventions, including the sandbox token setup and delivery row.

Frequently Asked Questions about transactional-email

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

FAQPage Schema
How do I add a transactional email with Postmark in a Next.js app?▼

Declare POSTMARK_API_TOKEN as a required string in lib/env/server.ts, set a verified From address as a code constant, render HTML and plaintext from one template, and record each send with the provider message id and a terminal status.

How do I prevent development sends from emailing real users?▼

Use a provider sandbox key in every non-production environment, such as Postmark's sandbox server. The token stays required so the full send path runs, but the sandbox accepts messages and delivers nothing to real recipients.

Why should the email provider token not be optional?▼

An optional token turns a blank value into a silent no-op where sends are skipped and only a log line hints at the problem. Making the token required fails the deploy instead, so a misconfigured environment never silently stops mailing.

Should the From address be an environment variable?▼

No. The From address must match a sender signature or domain verified with the provider, so a wrong value is a hard rejection at send time. Keep it as a constant in code next to the senders rather than in env configuration.

Why record every email send in a database row?▼

A delivery row per send with the provider message id and terminal status turns delivery questions into a query instead of a support guess. It also serves as the deduplication key for at-most-once claims in background jobs, unlike logs which expire.