React Email

Templates that are components, not table soup.

Email HTML is a twenty-year-old dialect with its own rules about tables, inline styles, and what Outlook will silently discard. Write the template as a React component instead and let the renderer produce the dialect — locally, before the request ever leaves your server.

OrderConfirmation.tsx→ email HTML
<Html> <Preview>Order 1043 confirmed</Preview> <Heading>Your order is confirmed</Heading> <Text>Thanks, {name}.</Text> <Button href={url}> View order </Button> <Hr /> <Text>Questions? Just reply.</Text></Html>
REST APIPOST /emails
SMTP:465 · TLS
Broadcastto an audience
Authenticatekey or credentials
Verify domainDKIM · SPF · DMARC
Suppress & meterbounces · ceilings
Sign and relayEU MTA · TLS
deliveredbouncedopenedclicked
Webhooksigned · retried
React Email runs before the pipeline does: your server renders the component to HTML, then that HTML goes in through the API door.

Pass a component, not a string

The Node SDK accepts a react field. It renders the element with @react-email/render and sends the resulting HTML — the JSX never travels over the wire, and eusend never executes your code.

node
import { Eusend } from '@eusend_dev/sdk'
import { OrderConfirmation } from './emails/order-confirmation'

const client = new Eusend(process.env.EUSEND_API_KEY)

await client.emails.send({
  from: '[email protected]',
  to: order.customerEmail,
  subject: 'Your order is confirmed',
  react: <OrderConfirmation order={order} />,
})

That means templates live in your repository, next to the code that sends them. They are reviewed in pull requests, typechecked against the data you pass in, and versioned with the release that introduced them. A wrong prop name is a build error rather than an email that says Hi undefined.

Or store the template with us

Sometimes the person editing the copy isn’t the person deploying the app. Stored templates hold rendered HTML on eusend and personalize it at send time through {{variable}} placeholders, so the send call carries data instead of markup.

stored template
await client.emails.send({
  from: '[email protected]',
  to: '[email protected]',
  subject: 'Your order is confirmed',
  templateId: 'tpl_order_confirmation',
  variables: { name: 'Alice', orderId: '1043' },
})

Templates can be written in the dashboard’s live-preview editor or created over the API — including by rendering a React Email component locally and submitting the output. The two approaches are the same pipeline from opposite ends.

What the renderer handles for you

  • Layout that survives. Components compile to the table-based structure email clients actually agree on, so a two-column layout doesn’t collapse in Outlook.
  • Inlined styles. Styles are inlined where clients strip <style> blocks, which is most of them.
  • A plain-text alternative. Supply text alongside the HTML — a multipart message reads better in text-only clients and looks less like spam to filters.

Tracking is applied after rendering

Open pixels and click-tracking rewrites happen server-side, on the finished HTML, and only when tracking is enabled for that send. Your component doesn’t need to know they exist — and every tracking request that results is served from EU infrastructure.

Write the next template in JSX.

Install the Node SDK, point the react field at a component, and send with a test key until it looks right in every client you care about.

Create a free account