resend
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseResend
Resend
Overview
概述
Resend is a modern email API built for developers, providing programmatic email sending with support for React Email components, domain management, and webhook-driven event tracking.
When to use: Transactional emails (welcome, password reset, receipts), batch email delivery, scheduled sending, webhook-based delivery tracking, domain verification, React Email integration.
When NOT to use: High-volume marketing automation (use dedicated ESP), SMS/push notifications, email hosting/inbox management.
Resend 是一款为开发者打造的现代化邮件API,支持通过编程方式发送邮件,同时兼容React Email组件、域名管理以及基于Webhook的事件追踪功能。
适用场景: 事务性邮件(欢迎邮件、密码重置、收据)、批量邮件投递、定时发送、基于Webhook的投递追踪、域名验证、React Email集成。
不适用场景: 高容量营销自动化(请使用专用ESP)、短信/推送通知、邮件托管/收件箱管理。
Quick Reference
快速参考
| Pattern | API | Key Points |
|---|---|---|
| Send email | | Returns |
| Send with React | | Node.js SDK only, renders React Email components server-side |
| Batch send | | Multiple emails in one request, no attachments/scheduling |
| Schedule email | | ISO 8601 or natural language, cancel before send window |
| Attachments | | Max 40MB total after encoding, supports content or path |
| Idempotent send | | Prevents duplicate sends on retry |
| Retrieve email | | Check delivery status and metadata |
| Add domain | | Returns DNS records for SPF, DKIM, MX |
| Verify domain | | Triggers DNS record check |
| List domains | | Returns all domains with status |
| Create webhook | Dashboard or API | Subscribe to email lifecycle events |
| Verify webhook | | Validates Svix signature headers |
| Tags | | Key-value pairs for categorization, ASCII only, max 256 chars |
| Custom headers | | Add custom email headers |
| Create contact | | Global contacts with custom properties |
| List contacts | | Returns all contacts |
| Create broadcast | | Bulk email to a segment, supports template variables |
| Send broadcast | | Delivers broadcast to a segment of contacts |
| 模式 | API | 核心要点 |
|---|---|---|
| 发送邮件 | | 返回 |
| 使用React发送邮件 | | 仅支持Node.js SDK,在服务端渲染React Email组件 |
| 批量发送邮件 | | 单次请求发送多封邮件,不支持附件和定时功能 |
| 定时发送邮件 | | 支持ISO 8601格式或自然语言,可在发送窗口前取消 |
| 附件处理 | | 编码后总大小最大40MB,支持内容或文件路径两种方式 |
| 幂等发送 | | 避免重试时重复发送邮件 |
| 检索邮件信息 | | 查看邮件投递状态及元数据 |
| 添加域名 | | 返回用于SPF、DKIM、MX验证的DNS记录 |
| 验证域名 | | 触发DNS记录检查 |
| 列出所有域名 | | 返回所有域名及其状态 |
| 创建Webhook | 控制台或API方式 | 订阅邮件生命周期事件 |
| 验证Webhook | | 验证Svix签名头 |
| 标签功能 | | 用于分类的键值对,仅支持ASCII字符,最大256个字符 |
| 自定义头信息 | | 添加自定义邮件头信息 |
| 创建联系人 | | 全局联系人,支持自定义属性 |
| 列出所有联系人 | | 返回所有联系人信息 |
| 创建批量邮件任务 | | 向用户分组发送批量邮件,支持模板变量 |
| 发送批量邮件 | | 向指定用户分组投递批量邮件 |
Common Mistakes
常见错误
| Mistake | Correct Pattern |
|---|---|
| Using root domain for sending | Use a subdomain like |
Not checking | Always destructure |
| Sending attachments in batch requests | Attachments and scheduling are not supported in batch sends |
| Hardcoding API key in source code | Use environment variable |
| Skipping webhook signature verification | Always verify using Svix headers before processing events |
Using | The |
| Not setting up DMARC after SPF/DKIM verify | Add DMARC record after SPF and DKIM pass to improve deliverability |
| Exceeding 50 recipients in a single send | Use batch send or loop for more than 50 recipients per request |
Using | Tag names and values must be ASCII letters, numbers, |
| Ignoring bounce/complaint webhooks | Monitor |
| 错误操作 | 正确做法 |
|---|---|
| 使用根域名发送邮件 | 使用子域名(如 |
未检查响应中的 | 始终解构 |
| 在批量请求中发送附件 | 批量发送不支持附件和定时功能 |
| 在源代码中硬编码API密钥 | 使用环境变量 |
| 跳过Webhook签名验证 | 处理事件前务必使用Svix头信息进行验证 |
在Node.js SDK外使用 | |
| SPF/DKIM验证通过后未设置DMARC | SPF和DKIM验证通过后添加DMARC记录以提升投递率 |
| 单次发送收件人超过50个 | 超过50个收件人时使用批量发送或循环请求 |
标签名称/值中使用 | 标签名称和值仅支持ASCII字母、数字、 |
| 忽略退信/投诉Webhook事件 | 监控 |
Delegation
任务委托
- Email template design: Use agent to discover React Email component patterns
Explore - Domain DNS configuration: Use agent for step-by-step DNS setup verification
Task - Webhook endpoint setup: Use agent for route handler implementation
Task
- 邮件模板设计:使用工具探索React Email组件模式
Explore - 域名DNS配置:使用工具进行分步DNS设置验证
Task - Webhook端点设置:使用工具实现路由处理器
Task
References
参考资料
- Sending emails, batch sending, attachments, scheduling, and idempotency
- Contacts, Segments, Broadcasts, template variables, and bulk sending
- Domain verification, DNS records, and sender identity management
- Webhook events, signature verification, and event handling
- 邮件发送、批量发送、附件、定时发送与幂等性
- 联系人、用户分组、批量邮件、模板变量与批量发送
- 域名验证、DNS记录与发件人身份管理
- Webhook事件、签名验证与事件处理