Design your emails as React components and send them in a single call. The SDK's react: convenience renders your component to a polished HTML body and a plaintext alternative, then sends both as one multipart/alternative message.
Overview
React Email gives you composable, type-safe components that render to email-client-safe HTML. PristineSend's SDK accepts a React element directly on send / sendBatch — no separate render step, and the recipient gets a proper html + text message for the best inbox placement.
Install
Add the SDK plus React Email. @react-email/render is an optional peer of the SDK — it's only needed when you use react:, and is imported lazily.
The SDK renders your component twice — once to HTML, and best-effort to plaintext (React Email's render(el, { plainText: true })) — and sends a multipart/alternative message with both. Plenty of spam filters penalize html-only mail, so this matters for deliverability. If the installed renderer can't produce plaintext, the SDK falls back to html-only rather than failing.
Need exact control of the text part? Pass text: and it overrides the generated plaintext:
"color:#ff7b72">await ps.emails.send({
to: "jane@example.com",
"color:#ff7b72">from: "hello@yourdomain.com",
subject: "Welcome to Acme",
react: <WelcomeEmail name="Jane" />,
// Optional: override the auto-generated plaintext alternative.
text: "Welcome, Jane! Get started: https://acme.com/start",
})