Back to Blog

Transactional Email Templates: A Developer's Guide

HTML and JSX transactional email templates for order confirmations, password resets, invoices, and alerts. How to send them with React Email, Resend, SendGrid, and Node.js.

Transactional email templates — developer guide

Posted by

Transactional emails are triggered by user actions — a purchase, a password reset, a signup confirmation, an invoice. They have the highest open rates of any email category (often 60–80%) because the recipient is actively waiting for them. They're also the emails most likely to be built by developers rather than marketers, which means they're often plain, unstyled, and forgettable.

This guide covers the main transactional email types, what each one needs to include, how to send them programmatically, and where to find free HTML and JSX templates to start from.

Transactional vs. Marketing Emails

Transactional emails are sent in response to a specific user action and contain information directly relevant to that action. Marketing emails are sent to a list for promotional or engagement purposes.

The distinction matters for two reasons:

  • Deliverability: Transactional emails should be sent via a separate sending stream or subdomain from marketing emails. A spam complaint on a promotional email shouldn't affect delivery of your order confirmation emails.
  • Unsubscribe rules: Marketing emails require a working unsubscribe link in most jurisdictions (CAN-SPAM, GDPR). Transactional emails are exempt — you can't unsubscribe from your own order confirmation. That said, a footer with your company info is still good practice.

Core Transactional Email Types

Order confirmation

Sent immediately after a successful purchase. The most important transactional email for e-commerce — customers actively look for it and reference it for return and tracking purposes.

Must include: Order number (in subject line and email body), itemized product list (name, quantity, price), order total, shipping address, expected delivery date, and a customer support contact or link.

Password reset

Triggered when a user requests a password reset. Should send within seconds of the request — any delay and the user will re-submit, creating duplicate emails and confusion.

Must include: A clear headline ("Reset your password"), a prominent CTA button linking to the reset URL, the link expiry time, a note that the link is single-use, and a "didn't request this?" safety notice. Keep it minimal — this email has one job.

Email verification / account activation

Sent after signup to verify the email address. Similar structure to a password reset — one action, one CTA, and a clear expiry window. The subject line should be direct: "Verify your email address" or "Confirm your [Product] account."

Invoice / receipt

Sent after a payment or subscription charge. Customers and businesses both need receipts for records and expense reporting.

Must include: Invoice number, billing date, itemized line items with amounts, subtotal, tax (if applicable), total amount charged, payment method (last 4 digits), billing address, and a PDF download link or "View invoice" CTA. For subscription billing, include the next billing date.

Shipping notification

Sent when an order ships. Often the most opened transactional email — customers watch for it to get their tracking number.

Must include: Tracking number with a direct link to the carrier's tracking page, estimated delivery date, items shipped (especially important for partial shipments), and a summary of what was ordered.

Account notification / alert

Covers security alerts (new login from a new device), usage alerts (approaching a quota limit), and account changes (email address updated, payment method changed).

Design principle: Alert emails should be visually distinct from promotional emails — simple layout, clear headline, action-oriented body copy. Security alerts in particular should feel urgent without being alarmist.

Sending Transactional Email Programmatically

Transactional emails are typically sent via an API call triggered by an event in your application — a successful Stripe payment, a new user signup, a form submission. The most common stacks:

React Email + Resend

The most popular stack for Next.js applications. React Email provides the component library for building email templates in JSX. Resend handles delivery via a simple API. The pattern:

  • Build your email template as a React component using React Email primitives (or copy a JSX template from EmailBits).
  • In your API route or server action, import the template and call render(<YourEmailTemplate props={...} />) to get the HTML string.
  • Pass the HTML to resend.emails.send({ to, subject, html }).

Nodemailer + any SMTP provider

For Node.js applications not using React, Nodemailer is the standard library. It works with any SMTP provider — SendGrid, Mailgun, Postmark, AWS SES, or a self-hosted SMTP server. Pass your HTML string (built from a template) to thehtml field of the mail options object.

SendGrid API

SendGrid's Dynamic Templates use Handlebars syntax ({{variable_name}}) for personalization. You can either build templates in the SendGrid dashboard (paste HTML from EmailBits) or pass a pre-rendered HTML string via the API for full programmatic control.

HTML and JSX Templates for Transactional Emails

EmailBits has free transactional email templates for all the types above — order confirmations, password resets, account verifications, invoices, shipping notifications, and account alerts. Every template includes both tabs:

  • HTML tab: Ready to paste into SendGrid Dynamic Templates, an ESP custom HTML editor, or any SMTP sending setup.
  • JSX tab: React Email component structure, ready to render with render() and send via Resend, SendGrid, or Nodemailer.

All 600+ free templates are available without an account. Copy and customize without sign-up.

Frequently Asked Questions

Do transactional emails need an unsubscribe link?

Not legally — transactional emails are exempt from CAN-SPAM's unsubscribe requirement. However, including a minimal footer with your company name and address is still good practice and helps with spam filter scoring. Do not include a marketing-style unsubscribe link, as this signals to ESPs that the email is promotional rather than transactional.

Should I use the same ESP for transactional and marketing emails?

Not on the same sending domain or IP pool. Marketing emails receive spam complaints at a higher rate than transactional emails. If they share infrastructure, complaint rates on marketing emails can affect the deliverability of your order confirmations. Most ESPs (SendGrid, Mailgun, Postmark) allow separate transactional and marketing streams, or use a dedicated transactional provider (Postmark, Resend) alongside a separate marketing ESP.

How do I pass dynamic data (order details, user name) into a template?

For React Email: pass data as props to the JSX component. For HTML templates sent via API: use your sending provider's substitution syntax (SendGrid Handlebars, Mailgun template variables, Postmark template models) or build the HTML string programmatically before passing it to the API.

What's the best transactional email service for Next.js?

Resend is the most commonly recommended for Next.js in 2026 — it was built for the React ecosystem, has a clean API, and pairs naturally with React Email for JSX-based templates. Postmark is the established choice for reliability and deliverability. Both work well with EmailBits JSX templates.