Send Email
Body Parameters
Sender email address.
To include a friendly name, use the format "Your Name <sender@domain.com>"
.
Recipient email address. For multiple addresses, send as an array of strings. Max 50.
Email subject.
Bcc recipient email address. For multiple addresses, send as an array of strings.
Cc recipient email address. For multiple addresses, send as an array of strings.
Reply-to email address. For multiple addresses, send as an array of strings.
The HTML version of the message.
The plain text version of the message.
The React component used to write the message. Only available in the Node.js SDK.
Custom headers to add to the email.
Filename and content of attachments (max 40mb per email)
Content of an attached file.
Name of attached file.
Path where the attachment file is hosted
Email tags
The name of the email tag.
It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).
It can contain no more than 256 characters.
The value of the email tag.
It can only contain ASCII letters (a–z, A–Z), numbers (0–9), underscores (_), or dashes (-).
It can contain no more than 256 characters.
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',
text: 'it works!',
attachments: [
{
filename: 'invoice.pdf',
content: invoiceBuffer,
},
],
headers: {
'X-Entity-Ref-ID': '123456789',
},
tags: [
{
name: 'category',
value: 'confirm_email',
},
],
});
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}
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',
text: 'it works!',
attachments: [
{
filename: 'invoice.pdf',
content: invoiceBuffer,
},
],
headers: {
'X-Entity-Ref-ID': '123456789',
},
tags: [
{
name: 'category',
value: 'confirm_email',
},
],
});
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}