import { Resend } from 'resend';

const resend = new Resend('re_123456789');

await resend.emails.send({
  from: 'Acme <onboarding@resend.dev>',
  to: ['delivered@resend.dev'],
  subject: 'hello world',
  html: '<p>it works!</p>',
});
{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}

Body Parameters

from
string
required

Sender email address.

To include a friendly name, use the format "Your Name <sender@domain.com>".

to
string | string[]
required

Recipient email address. For multiple addresses, send as an array of strings. Max 50.

subject
string
required

Email subject.

bcc
string | string[]

Bcc recipient email address. For multiple addresses, send as an array of strings.

cc
string | string[]

Cc recipient email address. For multiple addresses, send as an array of strings.

scheduled_at
string

Schedule email to be sent later. The date should be in natural language (e.g.: in 1 min) or ISO 8601 format (e.g: 2024-08-05T11:52:01.858Z).

See examples

reply_to
string | string[]

Reply-to email address. For multiple addresses, send as an array of strings.

html
string

The HTML version of the message.

text
string

The plain text version of the message.

react
React.ReactNode

The React component used to write the message. Only available in the Node.js SDK.

headers
object

Custom headers to add to the email.

attachments
array

Filename and content of attachments (max 40MB per email, after Base64 encoding of the attachments).

See examples

tags
array

Custom data passed in key/value pairs.

See examples.

import { Resend } from 'resend';

const resend = new Resend('re_123456789');

await resend.emails.send({
  from: 'Acme <onboarding@resend.dev>',
  to: ['delivered@resend.dev'],
  subject: 'hello world',
  html: '<p>it works!</p>',
});
{
  "id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}