All skills
resend avatar

/react-email

@e3ce28e official
by resendresend/resend-skills193 stars
28

Use when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emails to HTML, or sending emails with Resend. Covers welcome emails, password resets, notifications, order confirmations, newsletters, transactional emails, and the embeddable email editor component.

Use this Skill: https://skilld.dev/gh/resend/resend-skills/react-email

This session only. Nothing lands on disk.

referencesSENDING.md

≈950 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Sending Guide

General guidelines for sending emails with React Email.

Important: Use verified domains in from addresses. Ask the user for the verified domain and use it in the from address. If the user does not have a verified domain, ask them to verify one with their email service provider.

Send with Resend (Recommended)

When you have access to the Resend MCP tool:

import { render } from 'react-email';
import { WelcomeEmail } from './emails/welcome';

// Render to HTML
const html = await render(
  <WelcomeEmail name="John" verificationUrl="https://example.com/verify" />
);

// Create plain text version
const text = await render(<WelcomeEmail name="John" verificationUrl="https://example.com/verify" />, { plainText: true });

// Use Resend MCP send-email tool with:
// - to: recipient@example.com
// - subject: Welcome to Acme
// - html: html
// - text: text

If no MCP tool is available, you can use the Resend SDK for Node.js to send the email, which can accept React components directly:

import { Resend } from 'resend';
import { WelcomeEmail } from './emails/welcome';

const resend = new Resend(process.env.RESEND_API_KEY);

const { data, error } = await resend.emails.send({
  from: 'Acme <onboarding@resend.dev>',
  to: ['user@example.com'],
  subject: 'Welcome to Acme',
  react: <WelcomeEmail name="John" verificationUrl="https://example.com/verify" />
});

if (error) {
  console.error('Failed to send:', error);
}

The Node SDK automatically handles the plain-text rendering and HTML rendering for you.

Send as a Template to Resend

If preferred, you can upload the email as a template to Resend, which can be used to send emails with the Resend SDK for Node.js:

npx react-email@latest resend setup

This will require the user to provide a Resend API key in the terminal.

Once configured, the user can select a template to send using the UI in the "Resend" tab using the "Upload" button or the "Bulk Upload" button to upload multiple emails at once.

If using a template when sending with the Resend SDK for Node.js, the user can pass the template ID to the send method:

await resend.emails.send({
  from: 'Acme <onboarding@resend.dev>',
  to: ['user@example.com'],
  subject: 'Welcome to Acme',
  template: {
    id: '1245-1256-1234-1234',
  }
});

Send with Other Providers

Nodemailer:

import { render } from 'react-email';
import nodemailer from 'nodemailer';

const transporter = nodemailer.createTransport({
  host: 'smtp.example.com',
  port: 587,
  auth: { user: process.env.SMTP_USER, pass: process.env.SMTP_PASS }
});

const html = await render(<WelcomeEmail name="John" verificationUrl="https://example.com/verify" />);

await transporter.sendMail({
  from: 'noreply@example.com',
  to: 'user@example.com',
  subject: 'Welcome',
  html
});

Mailgun:

import { render } from 'react-email';
import FormData from 'form-data';
import Mailgun from 'mailgun.js';
import { WelcomeEmail } from './emails/welcome';

const mailgun = new Mailgun(FormData);
const client = mailgun.client({
  username: 'api',
  key: process.env.MAILGUN_API_KEY,
});

const html = await render(<WelcomeEmail name="John" verificationUrl="https://example.com/verify" />);

await client.messages.create(process.env.MAILGUN_DOMAIN, {
  from: 'noreply@example.com',
  to: ['user@example.com'],
  subject: 'Welcome',
  html,
});

SendGrid:

import { render } from 'react-email';
import sgMail from '@sendgrid/mail';

sgMail.setApiKey(process.env.SENDGRID_API_KEY);

const html = await render(<WelcomeEmail name="John" verificationUrl="https://example.com/verify" />);

await sgMail.send({
  to: 'user@example.com',
  from: 'noreply@example.com',
  subject: 'Welcome',
  html
});

Source: SKILL.md on GitHub

No alerts17d4 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The skill provides a suite of components and guidelines for building, rendering, and sending responsive HTML emails using React and Tailwind CSS. It includes support for a visual editor, internationalization, and integration with various email service providers. No security issues were detected.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    1 finding · Score: 86/100

Signed by skilld at e3ce28e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 3 months ago
Other metadata
metadata
{
  "author": "Resend",
  "version": "2.1.0",
  "homepage": "https://react.email",
  "source": "https://github.com/resend/react-email",
  "openclaw": {
    "install": [
      {
        "kind": "node",
        "package": "react-email",
        "label": "React Email"
      }
    ],
    "links": {
      "repository": "https://github.com/resend/react-email",
      "documentation": "https://resend.com/docs/react-email-skill"
    }
  }
}

README badge

README badge for resend/resend-skills/react-email

Build and send HTML emails using React components with a modern, component-based approach that works across all major email clients. Includes a dev preview server, Tailwind styling support, and an optional embeddable visual editor for email templates.

Generated from the current SKILL.md.

Does this work with TypeScript?
Yes. React Email is built for TypeScript and the skill examples use typed component props with interfaces. Make sure your tsconfig.json includes proper JSX support.
Can I use this with email services other than Resend?
Yes. React Email renders to HTML or plain text that works with any email service provider (Nodemailer, SendGrid, etc.). The skill includes examples for multiple providers.
What about responsive design and media queries?
Media queries are not reliably supported by email clients. The skill recommends using fixed layouts with max-width constraints and the Row/Column components instead of flexbox or grid.
Can I embed a visual editor in my application?
Yes. The skill includes the `@react-email/editor` component, a TipTap-based visual editor that can be embedded in your app and exports to email-ready HTML.
How do I handle static images like logos?
Place images in a `static` folder within your emails directory. Use environment-based URLs to switch between the dev server and production CDN in the same component.

Generated from the current SKILL.md. These answers refresh after source changes.