send-email

resend/resend-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/resend/resend-skills --skill send-email
0 commentsdiscussion
summary

Transactional and bulk email delivery via Resend API with single or batch endpoints.

  • Choose single endpoint for individual emails with attachments or scheduling; use batch endpoint for 2–100 distinct emails in one request to reduce API calls
  • Implement idempotency keys ( <event-type>/<entity-id> format) to prevent duplicate sends on retries, with 24-hour expiration
  • Retry only 429 (rate limit) and 500 (server error) responses using exponential backoff; fix 400/422 validation
skill.md

Send Email with Resend

Overview

Resend provides two endpoints for sending emails:

Approach Endpoint Use Case
Single POST /emails Individual transactional emails, emails with attachments, scheduled sends
Batch POST /emails/batch Multiple distinct emails in one request (max 100), bulk notifications

Choose batch when:

  • Sending 2+ distinct emails at once
  • Reducing API calls is important (by default, rate limit is 2 requests per second)
  • No attachments or scheduling needed

Choose single when:

  • Sending one email
  • Email needs attachments
  • Email needs to be scheduled
  • Different recipients need different timing

Quick Start

  1. Detect project language from config files (package.json, requirements.txt, go.mod, etc.)
  2. Install SDK (preferred) or use cURL - See references/installation.md
  3. Choose single or batch based on the decision matrix above
  4. Implement best practices - Idempotency keys, error handling, retries

Best Practices (Critical for Production)

Always implement these for production email sending. See references/best-practices.md for complete implementations.

Idempotency Keys

Prevent duplicate emails when retrying failed requests.

Key Facts
Format (single) <event-type>/<entity-id> (e.g., welcome-email/user-123)
Format (batch) batch-<event-type>/<batch-id> (e.g., batch-orders/batch-456)
Expiration 24 hours
Max length 256 characters
Duplicate payload Returns original response without resending
Different payload Returns 409 error

Error Handling

Code Action
400, 422 Fix request parameters, don't retry
401, 403 Check API key / verify domain, don't retry
409 Idempotency conflict - use new key or fix payload
429 Rate limited - retry with exponential backoff (by default, rate limit is 2 requests/second)
500 Server error - retry with exponential backoff

Retry Strategy

  • Backoff: Exponential (1s, 2s, 4s...)
  • Max retries: 3-5 for most use cases
  • Only retry: 429 (rate limit) and 500 (server error)
  • Always use: Idempotency keys when retrying

Single Email

Endpoint: POST /emails (prefer SDK over cURL)

Required Parameters

Parameter Type Description
from string Sender address. Format: "Name <[email protected]>"
to string[] Recipient addresses (max 50)
subject string Email subject line
html or text string Email body content

Optional Parameters

Parameter Type Description
cc string[] CC recipients
bcc string[] BCC recipients
reply_to* string[] Reply-to addresses
scheduled_at* string Schedule send time (ISO 8601)
attachments array File attachments (max 40MB total)
tags array Key/value pairs for tracking (see Tags)
headers object Custom headers

*Parameter naming varies by SDK (e.g., replyTo in Node.js, reply_to in Python).

Minimal Example (Node.js)

import { Resend } from 'resend';

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

const { data, error } = await resend.emails.send(
  {
    from: 'Acme <[email protected]>',
    to: ['[email protected]'],
    subject: 'Hello World',
    html: '<p>Email body here</p>',
  },
  { idempotencyKey: `welcome-email/${userId}` }
);

if (error) {
  console.error('Failed:', error.message);
  return;
}
console.log('Sent:', data.id);

See references/single-email-examples.md for all SDK implementations with error handling and retry logic.

Batch Email

Endpoint: POST /emails/batch (but prefer SDK over cURL)

Limitations

  • No attachments - Use single sends for emails with attachments
  • No scheduling - Use single sends for scheduled emails
  • Atomic - If one email fails validation, the entire batch fails
  • Max 100 emails per request
  • Max 50 recipients per individual email in the batch

Pre-validation

Since the entire batch fails on any validation error, validate all emails before sending:

  • Check required fields (from, to, subject, html/text)
  • Validate email formats
  • Ensure batch size <= 100

Minimal Example (Node.js)

import { Resend } from 'resend';

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

const { data, error } = await resend.batch.send(
  [
    {
      from: 'Acme <[email protected]>',
      to: ['[email protected]'],
      subject: 'Order Shipped',
      html: '<p>Your order has shipped!</p>',
    },
    {
      from: 'Acme <[email protected]>',
      to: ['[email protected]'],
      subject: 'Order Confirmed',
      html: '<p>Your order is confirmed!</p>',
    },
  ],
  { idempotencyKey: `batch-orders/${batchId}` }
);

if (error) {
  console.error('Batch failed:', error.message);
  return;
}
console.log('Sent:', data.map(e => e.id));

See references/batch-email-examples.md for all SDK implementations with validation, error handling, and retry logic.

Large Batches (100+ Emails)

For sends larger than 100 emails, chunk into multiple batch requests:

  1. Split into chunks of 100 emails each
  2. Use unique idempotency keys per chunk: <batch-prefix>/chunk-<index>
  3. Send chunks in parallel for better throughput
  4. Track results per chunk to handle partial failures

See references/batch-email-examples.md for complete chunking implementations.

Deliverability

Follow these practices to maximize inbox placement.

For more help with deliverability, install the email-best-practices skill with npx skills add resend/email-best-practices.

Required

Practice Why
Valid SPF, DKIM, DMARC record authenticate the email and prevent spoofing
Links match sending domain If sending from @acme.com, link to https://acme.com - mismatched domains trigger spam filters
Include plain text version Use both html and text parameters for accessibility and deliverability (Resend generates a plain text version if not provided)
Avoid "no-reply" addresses Use real addresses (e.g., support@) - improves trust signals
Keep body under 102KB Gmail clips larger messages

Recommended

Practice Why
Use subdomains Send transactional from notifications.acme.com, marketing from mail.acme.com - protects reputation
Disable tracking for transactional Open/click tracking can trigger spam filters for password resets, receipts, etc.

Tracking (Opens & Clicks)

Tracking is configured at the domain level in the Resend dashboard, not per-email.

Setting How it works Recommendation
Open tracking Inserts 1x1 transparent pixel Disable for transactional emails - can hurt deliverability
Click tracking Rewrites links through redirect Disable for sensitive emails (password resets, security alerts)

When to enable tracking:

  • Marketing emails where engagement metrics matter
  • Newsletters and announcements

When to disable tracking:

  • Transactional emails (receipts, confirmations, password resets)
  • Security-sensitive emails
  • When maximizing deliverability is priority

Configure via dashboard: Domain → Configuration → Click/Open Tracking

Webhooks (Event Notifications)

Track email delivery status in real-time using webhooks. Resend sends HTTP POST requests to your endpoint when events occur.

Event When to use
email.delivered Confirm successful delivery
email.bounced Remove from mailing list, alert user
email.complained Unsubscribe user (spam complaint)
email.opened / email.clicked Track engagement (marketing only)

Verify webhook signatures for every request. Without verification, anyone can send fake events to your endpoint.

See references/webhooks.md for setup, signature verification code, and all event types.

Tags

Tags are key/value pairs that help you track and filter emails.

tags: [
  { name: 'user_id', value: 'usr_123' },
  { name: 'email_type', value: 'welcome' },
  { name: 'plan', value: 'enterprise' }
]

Use cases:

  • Associate emails with customers in your system
  • Categorize by email type (welcome, receipt, password-reset)
  • Filter emails in the Resend dashboard
  • Correlate webhook events back to your application

Constraints: Tag names and values can only contain ASCII letters, numbers, underscores, or dashes. Max 256 characters each.

Templates

Use pre-built templates instead of sending HTML with each request.

const { data, error } = await resend.emails.send({
  from: 'Acme <[email protected]>',
  to: ['[email protected]'],
  subject: 'Welcome!',
  template
how to use send-email

How to use send-email on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add send-email
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/resend/resend-skills --skill send-email

The skills CLI fetches send-email from GitHub repository resend/resend-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/send-email

Reload or restart Cursor to activate send-email. Access the skill through slash commands (e.g., /send-email) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.529 reviews
  • Yash Thakker· Nov 27, 2024

    We added send-email from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Dhruvi Jain· Oct 18, 2024

    send-email fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Fatima Menon· Sep 25, 2024

    Keeps context tight: send-email is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Hiroshi Lopez· Sep 21, 2024

    Registry listing for send-email matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Oshnikdeep· Sep 13, 2024

    Registry listing for send-email matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Fatima Bansal· Aug 16, 2024

    send-email is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Tariq Garcia· Aug 12, 2024

    send-email reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ganesh Mohane· Aug 4, 2024

    send-email reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Sakshi Patil· Jul 23, 2024

    I recommend send-email for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Yusuf Farah· Jul 7, 2024

    Solid pick for teams standardizing on skills: send-email is focused, and the summary matches what you get after install.

showing 1-10 of 29

1 / 3