4.1.2 • Published 4 months ago

resend v4.1.2

Weekly downloads
4
License
MIT
Repository
github
Last release
4 months ago

Resend Node.js SDK

Node.js library for the Resend API.

Install

npm install resend
# or
yarn add resend

Examples

Send email with:

Setup

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');

Usage

Send your first email:

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

Send email using HTML

Send an email custom HTML content:

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

Send email using React

Start by creating your email template as a React component.

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.

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: <EmailTemplate firstName="John" product="MyApp" />,
});

License

MIT License

@everything-registry/sub-chunk-2656svelte-email-tailwindwabe-resendtemplate-geniusvisio-cms-libvitnode-backend-email-resend@documenso/nodemailer-resend@cubik-so/common@payloadcms/payload-cloud@payloadcms/plugin-cloudunipol-hr-backendreact-email-clientstrapi-provider-resendstrapi-provider-email-resendstrapi-provider-email-resend-strapispacerruniversity1university2university3university34universitymaxuniversitymax1@assetval/services@alterdepression/authwappler-resendzolamussa-core1@heliyos/heliyos-api-core@hbertoson/astro-resend@happy-trading/plugin-notification@emailsapp/cli@evershop/resend@loglib/email@kirofy.com/isomorphic-core@kirofy.com/isomorphic-package@redwoodjs/mailer-handler-resend@novu/providers@novu/resend@oberoncms/auth@ourofoundation/ouro-js@owlprotocol/contracts-apimy-next-authmtcrawlnuxt-resendroadmap-uiseven-authnetlify-simple-authnextjs-auth-templatenestjs-resendnext-auth-starternext-auth-packagepoxyauthportowebresend-cliresend-mcpresend-nuxtrinflowreact-waitlistlucia-mongoosemailcognitomail-bridgemedusa-plugin-resendmedusa-plugin-resend-custommedusa-plugin-resend-reactmedusa-plugin-resend-ts@wolfxlabs/resend@thischirag/auth@trigger.dev/resend@tripp-agency/asmus-node@typed-dev/medusa-notification-resend@systemfsoftware/trigger.dev_resend@teleflow/resend@toa.io/extensions.mail@zemble/email-resend@syncmaven/resend@tayar/email@template4u/create-authaegis-authalchmotion-appalle-authchatjet-aicreate-firebase-vite-react-appcreate-cql-appcreate-react-vite-firebase-appcreate-beerpal-startbeerpal-startemail_sending_hackjackemail_sending_hackjack2error-lensemail-client-hatfliq-apiform-forgegemigenii-server@simbashrd/web@shophost/rest-api@sigcoding/esb
4.1.2-canary.0

5 months ago

4.0.1

7 months ago

4.1.1-canary.0

6 months ago

4.1.2

4 months ago

4.1.1

5 months ago

4.1.0-alpha.0

7 months ago

4.0.1-alpha.0

8 months ago

3.4.0

12 months ago

3.3.0-canary.0

1 year ago

4.0.0

10 months ago

3.6.0-canary.3

10 months ago

3.6.0-canary.2

10 months ago

3.6.0-canary.4

10 months ago

3.6.0-canary.1

10 months ago

3.6.0-canary.0

10 months ago

3.3.0

1 year ago

3.5.0

11 months ago

4.0.0-canary.0

10 months ago

3.2.0

1 year ago

3.2.0-canary.0

1 year ago

3.2.0-canary.1

1 year ago

3.1.0

1 year ago

3.0.0-canary.0

1 year ago

3.0.0

1 year ago

2.1.0-canary.2

1 year ago

2.1.0

1 year ago

2.0.0-canary.0

2 years ago

2.0.0-canary.2

2 years ago

2.0.0-canary.1

2 years ago

2.1.0-canary.1

2 years ago

2.1.0-canary.0

2 years ago

2.0.0

2 years ago

2.0.1-canary.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.17.2

2 years ago

0.15.4

2 years ago

1.1.0-canary.0

2 years ago

0.18.0-canary.0

2 years ago

0.18.0-canary.1

2 years ago

0.15.0

2 years ago

0.14.1

2 years ago

0.16.0

2 years ago

0.15.1

2 years ago

0.17.0

2 years ago

0.15.2

2 years ago

0.17.1

2 years ago

0.15.3

2 years ago

1.0.1-canary.0

2 years ago

1.0.1-canary.2

2 years ago

1.0.1-canary.1

2 years ago

0.11.0

2 years ago

0.12.0

2 years ago

0.11.1

2 years ago

0.13.0

2 years ago

0.12.1

2 years ago

0.14.0

2 years ago

0.13.1

2 years ago

0.12.2

2 years ago

0.1.2

3 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.9.1

2 years ago

0.1.1

8 years ago