html, text, or both at the top level:
Providing content via
body: { text, html, react } is deprecated but still supported. Prefer top-level html, text, and react.React Email
Pass a React Email component asreact; the SDK renders it to HTML and plain text before sending. Install @react-email/render and its peer deps when using this:
- Bun
- pnpm
- npm
- Yarn
Email.tsx):
react:
Parameters
email.send(params)
The sender’s email address. Can include a display name:
"Your App <no-reply@yourapp.com>"A React Email component; the SDK renders it to HTML and plain text. Requires
@react-email/render, react, and react-dom.Deprecated. Use top-level
html, text, and react instead. Still supported: body: { text?, html?, react? }.Blind carbon copy recipients. Can be a single email address or an array of addresses.
Custom email headers as a key-value object (e.g.,
{ "X-Campaign": "welcome" }). The JS SDK also accepts [{ name, value }] and normalizes it automatically.Embed a tracking pixel in the HTML body. Fires an
email.opened webhook the first time the email is viewed. Requires html (or react).