resend-box
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseResend Box Skill
Resend Box 工具
Resend Box is a local email sandbox that:
- Mocks the Resend API - Drop-in replacement for
https://api.resend.com - Runs an SMTP server - Captures emails sent via SMTP on port 1025
- Provides a Web UI - View captured emails at http://127.0.0.1:4657
- Stores emails in-memory - All emails are lost when the server restarts
Resend Box 是一个本地邮件沙箱,具备以下功能:
- 模拟 Resend API - 可直接替代
https://api.resend.com - 运行 SMTP 服务器 - 捕获通过端口 1025 的 SMTP 发送的邮件
- 提供 Web UI - 在 http://127.0.0.1:4657 查看捕获的邮件
- 内存存储邮件 - 服务器重启后所有邮件都会丢失
When to Use
使用场景
- You're using the Resend SDK and want to test emails locally
- You're sending emails via SMTP and need to verify they're sent correctly
- You want to inspect email content (HTML, text, headers) during development
- You need to verify emails are sent to the correct recipients
- You're testing email templates before sending to real users
- 你正在使用 Resend SDK 并希望在本地测试邮件
- 你正在通过 SMTP 发送邮件,需要验证邮件是否正确发送
- 你想在开发过程中查看邮件内容(HTML、文本、邮件头)
- 你需要验证邮件是否发送给了正确的收件人
- 你在向真实用户发送邮件之前测试邮件模板
Prerequisites
前置条件
Start Resend Box:
bash
npx resend-box startConfigure your project to use the sandbox - see Setup Guide.
启动 Resend Box:
bash
npx resend-box start配置你的项目以使用沙箱 - 查看 设置指南。
Quick Reference
快速参考
Send an Email (via Resend API)
通过 Resend API 发送邮件
bash
curl -X POST http://127.0.0.1:4657/emails \
-H "Content-Type: application/json" \
-d '{
"from": "sender@example.com",
"to": "recipient@example.com",
"subject": "Test Email",
"html": "<p>Hello!</p>"
}'Required fields: , ,
Optional fields: , , , ,
fromtosubjecthtmltextccbccreplyTobash
curl -X POST http://127.0.0.1:4657/emails \
-H "Content-Type: application/json" \
-d '{
"from": "sender@example.com",
"to": "recipient@example.com",
"subject": "Test Email",
"html": "<p>Hello!</p>"
}'必填字段:, ,
可选字段:, , , ,
fromtosubjecthtmltextccbccreplyToGet All Emails
获取所有邮件
bash
curl http://127.0.0.1:4657/sandbox/emailsbash
curl http://127.0.0.1:4657/sandbox/emailsFilter Emails by Recipient
按收件人筛选邮件
bash
curl "http://127.0.0.1:4657/sandbox/emails?to=user@example.com"The filter is case-insensitive and supports partial matching.
tobash
curl "http://127.0.0.1:4657/sandbox/emails?to=user@example.com"toGet a Specific Email
获取特定邮件
bash
curl http://127.0.0.1:4657/sandbox/emails/{id}bash
curl http://127.0.0.1:4657/sandbox/emails/{id}Delete All Emails
删除所有邮件
bash
curl -X DELETE http://127.0.0.1:4657/sandbox/emailsbash
curl -X DELETE http://127.0.0.1:4657/sandbox/emailsView in Browser
在浏览器中查看
Open http://127.0.0.1:4657 to view captured emails in the web UI.
打开 http://127.0.0.1:4657,在 Web UI 中查看捕获的邮件。
Detailed Documentation
详细文档
- Setup Guide - Configure your project to use Resend Box
- Send Email Reference - Complete API for sending emails
- Get Emails Reference - Complete API for retrieving and filtering emails
- 设置指南 - 配置你的项目以使用 Resend Box
- 发送邮件参考 - 发送邮件的完整 API
- 获取邮件参考 - 检索和筛选邮件的完整 API