Skip to main content

Installing the SDK

1

Install the SDK

2

Initialize the Client

Sending an email

Various email parameters can be configured in the Console such as tracking, custom domains, and more.Send with html, text, or both at the top level:

Response

string
Unique identifier for the sent email, used for tracking delivery status and analytics.
object
Request metadata including ID, timestamp, and API version.
For React Email (render a React component to HTML/text), use the top-level react option and see the JS SDK Email docs.

Parameters

email.send(params)

string | string[]
required
The recipient’s email address or an array of email addresses.
string
required
The sender’s email address. Can include a display name: "Your App <no-reply@yourapp.com>"
string
required
The email subject line.
string
HTML version of the email (JS: top-level; Python: top-level). Use with text and/or react (JS) as needed.
string
Plain text version of the email.
ReactNode
JS only. A React Email component; the SDK renders it to HTML and plain text. See JS SDK Email.
object
JS only, deprecated. Use top-level html, text, and react instead. Still supported: body: { text?, html?, react? }.
string
Email address for replies. If not specified, replies will go to the from address.
string | string[]
Carbon copy recipients. Can be a single email address or an array of addresses.
string | string[]
Blind carbon copy recipients. Can be a single email address or an array of addresses.
object[]
Custom email headers as an array of objects with name and value properties.