# Transactional Email

> Use when sending product email — wire up Resend (or Postmark/SES) with typed React Email templates, send from background jobs not the request path, and cover deliverability basics like SPF/DKIM and unsubscribe.

- **Type:** Skill
- **Install:** `agentstack add skill-param087-saas-starter-skills-transactional-email`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [param087](https://agentstack.voostack.com/s/param087)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [param087](https://github.com/param087)
- **Source:** https://github.com/param087/saas-starter-skills/tree/main/skills/transactional-email

## Install

```sh
agentstack add skill-param087-saas-starter-skills-transactional-email
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Transactional Email

## Overview

SaaS apps send email constantly: verification, invites, receipts, password resets, alerts. Use a provider built for it (**Resend**, Postmark, or SES) with **React Email** for typed, previewable templates. Treat sending as a side effect: trigger it from a **background job**, not inline in the request, so a slow mail API never blocks the user or fails their action.

## When to use

- Sending verification, invite, receipt, reset, or notification emails.
- Building reusable, branded email templates.
- Email sends are slowing requests or failing them.

## Template + send

```tsx
// src/server/email/templates/Invite.tsx
import { Button, Html, Text } from "@react-email/components";

export function InviteEmail({ org, url }: { org: string; url: string }) {
  return (
    
      You've been invited to join {org}.
      Accept invite
    
  );
}
```

```ts
// src/server/email/send.ts
import "server-only";
import { Resend } from "resend";
import { env } from "@/env";
import { InviteEmail } from "./templates/Invite";

const resend = new Resend(env.RESEND_API_KEY);

export async function sendInvite(to: string, org: string, url: string) {
  const { error } = await resend.emails.send({
    from: "Acme ",
    to,
    subject: `Join ${org} on Acme`,
    react: InviteEmail({ org, url }),
  });
  if (error) throw new Error(`Email failed: ${error.message}`);
}
```

Call `sendInvite` from a **job/queue** (see `background-jobs`), and the action just enqueues it.

## Deliverability essentials

- **Verify your domain** and set **SPF + DKIM + DMARC** records — without them you land in spam.
- **Send from a real domain** (`noreply@yourapp.com`), not a free inbox.
- **Include unsubscribe** for anything non-essential; keep transactional and marketing streams separate.
- **Idempotency keys** on critical sends (receipts) so retries don't double-send.

## Pitfalls

- **Sending inline in the request** — a 3s mail API call becomes a 3s user wait, and a mail outage fails signups. Enqueue it.
- **Skipping DKIM/SPF** — great templates still hit spam without authenticated domains.
- **Hard-coded HTML strings** — unmaintainable; use React Email components and preview them.
- **Leaking data across tenants** — render with explicit, validated recipient + org; never reuse a cached template with stale props.
- **No failure handling** — log and retry via the job system; surface nothing scary to the user.

## Hand-off

Reliable, typed email behind a service. `background-jobs` runs the actual send off the request path; `observability-and-errors` tracks failures.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [param087](https://github.com/param087)
- **Source:** [param087/saas-starter-skills](https://github.com/param087/saas-starter-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-param087-saas-starter-skills-transactional-email
- Seller: https://agentstack.voostack.com/s/param087
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
