Send a transactional email through Drin reliably. Use when the user or agent needs to send an email (notification, receipt, OTP, alert, password reset, reply) via the Drin email API — covers picking a verified sending domain, composing the message, sending it, and handling suppressed/rate-limited errors. Works through the @drin00/mcp tools, the drin CLI, the drin SDK, or the raw /v1 REST API.
Design & media
drin-build-template
Try itBuild a transactional HTML email that renders correctly across Gmail, Outlook, and Apple Mail, with a plain-text alternative and dark-mode support. Use when writing or editing the HTML/text body of an email, or creating a reusable Drin template with variables. Covers the table-based layout rules, inlined styles, bulletproof buttons, preheader, and Drin's {{handlebars}} variable/section syntax.
What it does
Build a transactional HTML email that renders correctly across Gmail, Outlook, and Apple Mail, with a plain-text alternative and dark-mode support. Use when writing or editing the HTML/text body of an email, or creating a reusable Drin template with variables. Covers the table-based layout rules, inlined styles, bulletproof buttons, preheader, and Drin's {{handlebars}} variable/section syntax.
The skill document
Building cross-client transactional email
Email clients are not browsers. Outlook uses Word to render HTML; Gmail strips `
<!-- preheader: shown in the inbox preview, hidden in the body -->
{{preheader | default:"A quick update from {{brandName}}"}}
Hi {{firstName | default:"there"}},
{{body}}
<!-- bulletproof button -->
{{ctaLabel | default:"Open"}}
Sent by {{brandName}}. {{#if unsubscribeUrl}}Unsubscribe.{{/if}}
Always produce a matching plain-text version, e.g.:
Hi {{firstName | default:"there"}},
{{body}}
{{ctaLabel | default:"Open"}}: {{ctaUrl}}
Sent by {{brandName}}.
## React Email (TypeScript)
If the project sends from TypeScript, prefer [react-email](https://react.email)
components and render with the Drin SDK helper:
```ts
import { sendReactEmail } from "@drin00/sdk/react-email";
await sendReactEmail(drin, { from, to, subject, react: });
// renders html + text, then sends
Drin's {{handlebars}} template syntax
When you save a reusable template in Drin (create_template / POST /v1/templates
/ dashboard), the engine is a safe handlebars subset — no arbitrary code,
purpose-built for email:
{{ path }}— HTML-escaped interpolation (use in the HTML body).{{{ path }}}or{{& path }}— raw/unescaped (use sparingly, e.g. pre-sanitized HTML).{{ path | default:"x" }},{{ path | upper }},{{ path | lower }}— filters.{{#if path}} … {{else}} … {{/if}},{{#unless path}} … {{/unless}}.{{#each items}} … {{this}} / {{@index}} / {{@first}} / {{@last}} … {{else}} … {{/each}}.{{../x}}— parent scope;{{! comment }}— stripped.
Missing variables render as empty string and are reported. Before sending, call
render_template (a saved template) or preview_template (an unsaved draft;
templates.preview in the SDK) and check the missing array — fix any required
variable that resolved to empty. The subject and text parts render
unescaped; the html part is escaped by default.
Related skills
Get transactional email deliverability right with Drin — authenticate the sending domain (SPF/DKIM/DMARC), stay under bounce/complaint limits, honor suppressions, and include one-click unsubscribe where required. Use when setting up a sending domain, diagnosing why mail lands in spam or bounces, deciding sending volume/warmup, or reviewing an email program for compliance and reputation.
Run an autonomous email inbox with Drin — receive inbound email on a domain, read conversation threads, and reply in-thread. Use when building or operating an agent that must read and respond to email (support triage, scheduling, an "email me to do X" interface), set up inbound receiving, test the receive pipeline, or process new inbound messages and act on them.
Use when the user asks to "build the email HTML", "make this email responsive", "fix dark-mode rendering", or "QA the email across clients"; produces the cod...
Write and verify HTML email that renders correctly across email clients. Use whenever building, editing, or reviewing an HTML email, an email template, or a transactional message, and whenever a question involves Outlook, Gmail, Apple Mail, or "will this render in email". Covers what CSS and HTML each client supports, backed by caniemail.com data. Provides the layout rules that keep an email compatible in the first place, then lints the finished markup and reports only what breaks, per client, with workarounds. Not for sending mail, deliverability, SPF/DKIM/DMARC, or ESP choice.
Use when creating or sending Mailtrap-hosted email templates, Handlebars personalization, template UUID in API payloads, or debugging variables and preview. Use when separating email design from application code for transactional or bulk sends.