Node.js library for the Resend API.
npm install resend
# or
yarn add resendSend email with:
First, you need to get an API key, which is available in the Resend Dashboard.
import { Resend } from 'resend';
const resend = new Resend('re_123456789');Send your first email:
await resend.emails.send({
from: '[email protected]',
to: '[email protected]',
replyTo: '[email protected]',
subject: 'hello world',
text: 'it works!',
});Send an email custom HTML content:
await resend.emails.send({
from: '[email protected]',
to: '[email protected]',
replyTo: '[email protected]',
subject: 'hello world',
html: '<strong>it works!</strong>',
});MIT License