
send-email
Use when sending transactional emails (welcome messages, order confirmations, password resets, receipts), notifications, or bulk emails via Resend API.
- Installs
- 459
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/resend/resend-skills --skill send-email- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads send-email automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
- Detect project language from config files (package.json, requirements.txt, go.mod, etc.)
- Install SDK (preferred) or use cURL - See references/installation.md
- Choose single or batch based on the decision matrix above
- 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@domain.com>" |
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 <onboarding@resend.dev>',
to: ['delivered@resend.dev'],
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 <notifications@acme.com>',
to: ['delivered@resend.dev'],
subject: 'Order Shipped',
html: '<p>Your order has shipped!</p>',
},
{
from: 'Acme <notifications@acme.com>',
to: ['delivered@resend.dev'],
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:
- Split into chunks of 100 emails each
- Use unique idempotency keys per chunk:
<batch-prefix>/chunk-<index> - Send chunks in parallel for better throughput
- 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 <hello@acme.com>',
to: ['delivered@resend.dev'],
subject: 'Welcome!',
template: {
id: 'tmpl_abc123', // or alias: 'welcome-email'
variables: {
USER_NAME: 'John', // Case-sensitive! Must match template exactly.
ORDER_TOTAL: '$99.00'
}
}
});
Note: Variable names are case-sensitive and must match the template definition exactly. Any casing is valid — USER_NAME, userName, or user_name — as long as the send call uses the same casing as defined in the template.
| Fact | Detail |
|---|---|
| Reserved names | FIRST_NAME, LAST_NAME, EMAIL, UNSUBSCRIBE_URL, contact, this |
| Fallback values | Optional — if not set and variable missing at send time, send fails (422) |
| Can't combine with | html, text, or react parameters |
| subject / from | Template defaults can be overridden per-send |
Templates must be published before use. Draft templates cannot send.
To create, update, publish, or delete templates via API, use the templates skill.
Testing
Avoid testing with fake addresses at real email providers.
Using addresses like test@gmail.com, example@outlook.com, or fake@yahoo.com will:
- Bounce - These addresses don't exist
- Destroy your sender reputation - High bounce rates trigger spam filters
- Get your domain blocklisted - Providers flag domains with high bounce rates
Safe Testing Options
| Method | Address | Result |
|---|---|---|
| Delivered | delivered@resend.dev | Simulates successful delivery |
| Bounced | bounced@resend.dev | Simulates hard bounce |
| Complained | complained@resend.dev | Simulates spam complaint |
| Your own email | Your actual address | Real delivery test |
For development: Use the resend.dev test addresses to simulate different scenarios without affecting your reputation.
For staging: Send to real addresses you control (team members, test accounts you own).
Domain Warm-up
New domains must gradually increase sending volume to establish reputation.
Why it matters: Sudden high volume from a new domain triggers spam filters. ISPs expect gradual growth.
Recommended Schedule
Existing domain
| Day | Messages per day | Messages per hour |
|---|---|---|
| 1 | Up to 1,000 emails | 100 Maximum |
| 2 | Up to 2,500 emails | 300 Maximum |
| 3 | Up to 5,000 emails | 600 Maximum |
| 4 | Up to 5,000 emails | 800 Maximum |
| 5 | Up to 7,500 emails | 1,000 Maximum |
| 6 | Up to 7,500 emails | 1,500 Maximum |
| 7 | Up to 10,000 emails | 2,000 Maximum |
New domain
| Day | Messages per day | Messages per hour |
|---|---|---|
| 1 | Up to 150 emails | |
| 2 | Up to 250 emails | |
| 3 | Up to 400 emails | |
| 4 | Up to 700 emails | 50 Maximum |
| 5 | Up to 1,000 emails | 75 Maximum |
| 6 | Up to 1,500 emails | 100 Maximum |
| 7 | Up to 2,000 emails | 150 Maximum |
Monitor These Metrics
| Metric | Target | Action if exceeded |
|---|---|---|
| Bounce rate | < 4% | Slow down, clean list |
| Spam complaint rate | < 0.08% | Slow down, review content |
Don't use third-party warm-up services. Focus on sending relevant content to real, engaged recipients.
Suppression List
Resend automatically manages a suppression list of addresses that should not receive emails.
Addresses are added when:
- Email hard bounces (address doesn't exist)
- Recipient marks email as spam
- You manually add them via dashboard
What happens: Resend won't attempt delivery to suppressed addresses. The email.suppressed webhook event fires instead.
Why this matters: Continuing to send to bounced/complained addresses destroys your reputation. The suppression list protects you automatically.
Management: View and manage suppressed addresses in the Resend dashboard under Suppressions.
Common Mistakes
| Mistake | Fix |
|---|---|
| Retrying without idempotency key | Always include idempotency key - prevents duplicate sends on retry |
| Using batch for emails with attachments | Batch doesn't support attachments - use single sends instead |
| Not validating batch before send | Validate all emails first - one invalid email fails the entire batch |
| Retrying 400/422 errors | These are validation errors - fix the request, don't retry |
| Same idempotency key, different payload | Returns 409 error - use unique key per unique email content |
| Tracking enabled for transactional emails | Disable open/click tracking for password resets, receipts - hurts deliverability |
| Using "no-reply" sender address | Use real address like support@ - improves trust signals with email providers |
| Not verifying webhook signatures | Always verify — unverified events can't be trusted |
| Testing with fake emails (test@gmail.com) | Use delivered@resend.dev - fake addresses bounce and hurt reputation |
| Template variable name mismatch | Variable names are case-sensitive — must match the template definition exactly. Any casing is valid; USER_NAME and firstName are both fine as long as the send call matches. |
| Sending high volume from new domain | Warm up gradually - sudden spikes trigger spam filters |
Notes
- The
fromaddress must use a verified domain - If the sending address cannot receive replies, set the
reply_toparameter to a valid address. - Store API key in
RESEND_API_KEYenvironment variable - Node.js SDK supports
reactparameter for React Email components - Resend returns
error,data,headersin the response. - Data returns
{ id: "email-id" }on success (single) or array of IDs (batch) - For marketing campaigns to large lists, use Resend Broadcasts instead
FAQ
What does the send-email skill do?
Use when sending transactional emails (welcome messages, order confirmations, password resets, receipts), notifications, or bulk emails via Resend API.
How do I install send-email?
Run npx skills add https://github.com/resend/resend-skills --skill send-email in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/send-email/ (personal) or .claude/skills/send-email/ (project).
Which AI agents can use send-email?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is send-email safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains send-email?
It is published by resend in resend/resend-skills, and it is an official skill from the maker of the technology it covers. It has 459 recorded installs.
More from resend/resend-skills
resend
resend/resend-skills
Use when working with the Resend email API — sending transactional emails (single or batch), receiving inbound emails via webhooks, managing email templates, tracking delivery events, managing domains, contacts, broadcasts, webhooks, API keys, inboxes (threads, labels, drafts, replies), automations, events, viewing API request logs, checking account usage and quotas, or setting up the Resend SDK. Always use this skill when the user mentions Resend, even for simple tasks like "send an email with Resend" — the skill contains critical gotchas (idempotency keys, webhook verification, template variable syntax) that prevent common production issues.
email-best-practices
resend/resend-skills
Use when building email features, emails going to spam, high bounce rates, setting up SPF/DKIM/DMARC authentication, implementing email capture, ensuring compliance (CAN-SPAM, GDPR, CASL), handling webhooks, retry logic, making emails accessible (alt text, headings, contrast, screen readers), or deciding transactional vs marketing.
agent-email-inbox
resend/resend-skills
Use when building any system where email content triggers actions — AI agent inboxes, automated support handlers, email-to-task pipelines, or any workflow processing untrusted inbound email. Always use this skill when the user wants to receive emails and act on them programmatically, even if they don't mention "agent" — the skill contains critical security patterns (sender allowlists, content filtering, sandboxed processing) that prevent untrusted email from controlling your system.
resend-cli
resend/resend-skills
Operate the Resend platform from the terminal — send emails (including React Email .tsx templates via --react-email), manage domains, contacts, broadcasts, templates, webhooks, API keys, logs, automations, and events via the resend CLI. Use when the user wants to run Resend commands in the shell, scripts, or CI/CD pipelines, or send/preview React Email templates. Always load this skill before running resend commands — it contains the non-interactive flag contract and gotchas that prevent silent failures.
react-email
resend/resend-skills
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.
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。