Skip to main content

Install

Download the Node.js SDK using your favorite package manager.
npm install resend

Quickstart

The easiest way to send an email is by using the html parameter.
import { PearsDB } from 'pearsdb';
const pearsdb = new PearsDB('pdb_123456789');

(async function () {
  try {
    const data = await pearsdb.create({
      name: 'Bill Stern',
      company: 'Acme Corp',
      to: ['delivered@resend.dev'],
      subject: 'Hello World'
    });

    console.log(data);
  } catch (error) {
    console.error(error);
  }
})();
By using this you won’t be able to use rules and conditions.

Run Locally

Run the following command in your terminal.
npx next dev
I