# resend

> Node.js library for the Resend API

Latest version **6.29.0** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install resend
pnpm add resend
yarn add resend
bun add resend
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.29.0 |
| Published | 2026-09-24 |
| First published | 2017-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 2 |
| Unpacked size | 275.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 956 |
| Maintainers | bukinoshita, zenorocha, rehan, dielduarte, jopcmelo, cisneiros, gabrielmfern, carolmoreschi, lucasfcosta, felipefreitag, vcapretz, isabellaaquino, carolina-josephik, mwoss |

## Links

- npm: https://www.npmjs.com/package/resend
- Repository: https://github.com/resend/resend-node
- Homepage: https://github.com/resend/resend-node#readme
- Issues: https://github.com/resend/resend-node/issues
- npm.io page: https://npm.io/package/resend

## Dependencies (2)

- [postal-mime](https://npm.io/package/postal-mime.md) 2.7.6
- [standardwebhooks](https://npm.io/package/standardwebhooks.md) 1.1.1

## Recent versions

- 6.29.0 (latest) — 2026-09-24
- 6.28.1-preview-inboxes.1 (preview-inboxes) — 2026-09-23
- 6.28.0-preview-inboxes.0 (preview) — 2026-09-10
- 6.19.0-preview-headless-dashboard.7 (preview-headless-dashboard) — 2026-08-13
- 6.18.0-canary.0 (canary) — 2026-07-13
- 6.5.2-batch.0 (preview-batch) — 2025-11-27
- 6.1.2-preview-templates.1 (preview-templates) — 2025-10-14
- 4.7.0-preview-topics.2 (preview-topics) — 2025-07-23
- 6.28.1-preview-inboxes.0 — 2026-09-15
- 6.28.1 — 2026-09-15
- 6.28.0 — 2026-09-11
- 6.27.0 — 2026-09-09
- 6.26.0 — 2026-09-03
- 6.25.0 — 2026-08-28
- 6.24.0 — 2026-08-26
- … 178 more at https://npm.io/package/resend/versions

## README

![nodejs-og](https://github.com/user-attachments/assets/7bc8f7c1-1877-4ddd-89f9-4f8d9bc32ed5)

<p align="center">
  <a href="https://resend.com/docs/send-with-nodejs">Quickstart Docs</a>
</p>

<p align="center">
  Framework guides
</p>
<p align="center">
  <a 
  - <a href="https://resend.com/docs/send-with-nextjs">Next.js</a> 
  - <a href="https://resend.com/docs/send-with-remix">Remix</a> 
  - <a href="https://resend.com/docs/send-with-nuxt">Nuxt</a> 
  - <a href="https://resend.com/docs/send-with-express">Express</a> 
  - <a href="https://resend.com/docs/send-with-redwoodjs">RedwoodJS</a> 
  - <a href="https://resend.com/docs/send-with-hono">Hono</a> 
  - <a href="https://resend.com/docs/send-with-bun">Bun</a> 
  - <a href="https://resend.com/docs/send-with-astro">Astro</a> 
</p>

# Resend Node.js SDK

Node.js library for the Resend API.

## Install

```bash
npm install resend
# or
yarn add resend
```

## Examples

Send email with:

- [Node.js](https://github.com/resend/resend-node-example)
- [Next.js (App Router)](https://github.com/resend/resend-nextjs-app-router-example)
- [Next.js (Pages Router)](https://github.com/resend/resend-nextjs-pages-router-example)
- [Express](https://github.com/resend/resend-express-example)

## Setup

First, you need to get an API key, which is available in the [Resend Dashboard](https://resend.com/api-keys).

```js
import { Resend } from 'resend';
const resend = new Resend('re_xxxx...xxxxxx');
```

## Usage

Send your first email:

```js
const { data } = await resend.emails.send({
  from: 'you@example.com',
  to: 'user@gmail.com',
  replyTo: 'you@example.com',
  subject: 'hello world',
  text: 'it works!',
});

console.log(`Email ${data.id} has been sent`);
```

> [!NOTE]  
> In order to send from your own domain, you will first need to verify your domain in the [Resend Dashboard](https://resend.com/domains). 

## Send email using HTML

Send an email custom HTML content:

```js
const { data } = await resend.emails.send({
  from: 'you@example.com',
  to: 'user@gmail.com',
  replyTo: 'you@example.com',
  subject: 'hello world',
  html: '<strong>it works!</strong>',
});

console.log(`Email ${data.id} with custom HTML content has been sent.`);
```

## Send email using React

Start by creating your email template as a React component.

```jsx
import React from 'react';

export default function EmailTemplate({ firstName, product }) {
  return (
    <div>
      <h1>Welcome, {firstName}!</h1>
      <p>Thanks for trying {product}. We’re thrilled to have you on board.</p>
    </div>
  );
}
```

Then import the template component and pass it to the `react` property.

```jsx
import EmailTemplate from '../components/EmailTemplate';

const { data } = await resend.emails.send({
  from: 'you@example.com',
  to: 'user@gmail.com',
  replyTo: 'you@example.com',
  subject: 'hello world',
  react: <EmailTemplate firstName="John" product="MyApp" />,
});

console.log(`Email ${data.id} with a React template has been sent`);
```

> [!NOTE]
> If you're sending emails from a file that doesn't have JSX transpilation set up (e.g., in a `.js`/`.ts` file instead of JSX/TSX), use React's `jsx` runtime function instead of passing the component as JSX:
>
>```js
>import { jsx } from 'react/jsx-runtime'
>import EmailTemplate from '../components/EmailTemplate';
>
>await resend.emails.send({
>  from: 'you@example.com',
>  to: 'user@gmail.com',
>  replyTo: 'you@example.com',
>  subject: 'hello world',
>  react: jsx(EmailTemplate, { firstName:"John", product:"MyApp" }),
>});
>```

## License

MIT License

---
_Source: https://npm.io/package/resend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
