Skip to content

Commit 797dff2

Browse files
christina-de-martinezgabrielmferncpenned
authored
feat: add resend integration docs for templates. (#2655)
Co-authored-by: Gabriel Miranda <[email protected]> Co-authored-by: cpenned <[email protected]>
1 parent f4faa30 commit 797dff2

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

apps/docs/cli.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,12 @@ Generates the plain HTML files of your emails into a `out` directory.
194194
## `email help <cmd>`
195195

196196
Shows all the options for a specific command.
197+
198+
## `email resend setup`
199+
200+
Sets up a configuration in your home directory with your Resend API Key by prompting interactively.
201+
202+
## `email resend reset`
203+
204+
Removes your API Key from the configuration in your home directory.
205+

apps/docs/integrations/resend.mdx

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
22
title: 'Send email using Resend'
33
sidebarTitle: 'Resend'
4-
description: 'Learn how to send an email using React Email and the Resend Node.js SDK.'
4+
description: 'Learn how to send an email and set up Templates using React Email and the Resend Node.js SDK.'
55
'og:image': 'https://react.email/static/covers/react-email.png'
66
---
77

8+
## Send email with Resend
89
<Tip>Resend was built by the same team that created React Email, which makes this our recommendation to send emails.</Tip>
910

10-
## 1. Install dependencies
11+
### 1. Install dependencies
1112

1213
Get the [@react-email/components](https://www.npmjs.com/package/@react-email/components) package and the [Resend Node.js SDK](https://www.npmjs.com/package/resend).
1314

@@ -27,7 +28,7 @@ pnpm add resend @react-email/components
2728

2829
</CodeGroup>
2930

30-
## 2. Create an email using React
31+
### 2. Create an email using React
3132

3233
Start by building your email template in a `.jsx` or `.tsx` file.
3334

@@ -48,7 +49,7 @@ export function Email(props) {
4849
export default Email;
4950
```
5051

51-
## 3. Send email
52+
### 3. Send email
5253

5354
<Info>When integrating with other services, you need to convert your React template into HTML before sending. Resend takes care of that for you.</Info>
5455

@@ -68,6 +69,37 @@ await resend.emails.send({
6869
});
6970
```
7071

72+
## Set up Templates with Resend
73+
74+
[Resend Templates](https://resend.com/docs/dashboard/templates/introduction) are a great way to collaborate on emails with your team, even if they're not technical. Upload a React Email Template to Resend and your entire team can collaborate in real-time in the visual editor.
75+
76+
Here's how to get started.
77+
78+
### 1. Add your Resend API Key
79+
80+
First, sign up for a [free Resend account](https://resend.com/signup).
81+
82+
Next, set up the Resend integration using the React Email CLI:
83+
84+
```bash
85+
npx react-email@latest resend setup
86+
```
87+
88+
This will prompt you to enter your Resend API Key. To get one, navigate to [API Keys](https://resend.com/api-keys) in your Resend dashboard, click **Create API key**, and ensure that the API Key is scoped to **Full Access**.
89+
90+
Paste the API Key into the terminal and press enter.
91+
92+
### 2. Upload a Template to Resend
93+
94+
Run React Email and visit the **Resend** tab of the toolbar, located at the bottom of the window.
95+
96+
Choose **Upload** or **Bulk Upload** to import your Template to Resend.
97+
98+
<video src="https://cdn.resend.com/posts/react-email-resend-integration.mp4" autoPlay loop playsInline class="extraWidth"></video>
99+
100+
If you want to remove the Resend integration, run `npx react-email@latest resend reset`.
101+
102+
71103
## Try it yourself
72104

73105
<Card

0 commit comments

Comments
 (0)