Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEmail with StableEmail
使用StableEmail处理邮件
Send emails, manage inboxes, and run custom subdomains via x402 payments at .
https://stableemail.dev通过x402支付,在上发送邮件、管理收件箱以及运行自定义子域名。
https://stableemail.devSetup
设置
See rules/getting-started.md for installation and wallet setup.
安装和钱包设置请查看rules/getting-started.md。
Quick Reference
快速参考
| Task | Endpoint | Price |
|---|---|---|
| Send email (shared) | | $0.02 |
| Buy subdomain | | $5.00 |
| Send from subdomain | | $0.005 |
| Buy inbox | | $1.00 |
| Send from inbox | | $0.005 |
| Top up inbox (30d) | | $1.00 |
| Top up inbox (90d) | | $2.50 |
| Top up inbox (365d) | | $8.00 |
| List inbox messages | | $0.001 |
| Read inbox message | | $0.001 |
| Create subdomain inbox | | $0.25 |
| List subdomain messages | | $0.001 |
| Read subdomain message | | $0.001 |
| 任务 | 接口 | 价格 |
|---|---|---|
| 发送邮件(共享地址) | | $0.02 |
| 购买子域名 | | $5.00 |
| 从子域名发送邮件 | | $0.005 |
| 购买收件箱 | | $1.00 |
| 从收件箱发送邮件 | | $0.005 |
| 续费收件箱(30天) | | $1.00 |
| 续费收件箱(90天) | | $2.50 |
| 续费收件箱(365天) | | $8.00 |
| 列出收件箱消息 | | $0.001 |
| 读取收件箱消息 | | $0.001 |
| 创建子域名收件箱 | | $0.25 |
| 列出子域名消息 | | $0.001 |
| 读取子域名消息 | | $0.001 |
Free Management Endpoints
免费管理接口
| Task | Endpoint |
|---|---|
| Subdomain status | |
| Update subdomain | |
| Manage signers | |
| Inbox status | |
| Update inbox | |
| Cancel inbox | |
| Delete message | |
| List subdomain inboxes | |
| Delete subdomain inbox | |
| Update subdomain inbox | |
| Delete subdomain message | |
Free endpoints use SIWX wallet authentication (handled automatically by ).
npx agentcash fetch| 任务 | 接口 |
|---|---|
| 子域名状态 | |
| 更新子域名 | |
| 管理签署人 | |
| 收件箱状态 | |
| 更新收件箱 | |
| 取消收件箱 | |
| 删除消息 | |
| 列出子域名收件箱 | |
| 删除子域名收件箱 | |
| 更新子域名收件箱 | |
| 删除子域名消息 | |
免费接口使用SIWX钱包认证(由自动处理)。
npx agentcash fetchSend an Email
发送邮件
Send from the shared address:
relay@x402email.combash
npx agentcash fetch https://stableemail.dev/api/send -m POST -b '{
"to": ["recipient@example.com"],
"subject": "Hello from x402",
"html": "<h1>Hi!</h1><p>This email was sent via x402 payments.</p>",
"text": "Hi! This email was sent via x402 payments.",
"replyTo": "your-real-email@example.com"
}'Parameters:
- — array of recipient emails (required)
to - — email subject (required)
subject - and/or
html— email body (at least one required)text - — reply-to address (optional but recommended)
replyTo - — array of
attachments(optional, max 5, base64 encoded, ~3.75MB limit each){content, contentType, filename}
Attachment example:
json
{
"attachments": [{
"content": "base64-encoded-content...",
"contentType": "application/pdf",
"filename": "report.pdf"
}]
}For calendar invites, use .
contentType: "text/calendar; method=REQUEST"从共享地址发送邮件:
relay@x402email.combash
npx agentcash fetch https://stableemail.dev/api/send -m POST -b '{
"to": ["recipient@example.com"],
"subject": "Hello from x402",
"html": "<h1>Hi!</h1><p>This email was sent via x402 payments.</p>",
"text": "Hi! This email was sent via x402 payments.",
"replyTo": "your-real-email@example.com"
}'参数:
- — 收件人邮箱数组(必填)
to - — 邮件主题(必填)
subject - 和/或
html— 邮件正文(至少填一个)text - — 回复地址(可选但推荐填写)
replyTo - —
attachments数组(可选,最多5个,base64编码,单个文件约3.75MB限制){content, contentType, filename}
附件示例:
json
{
"attachments": [{
"content": "base64-encoded-content...",
"contentType": "application/pdf",
"filename": "report.pdf"
}]
}若要发送日历邀请,请使用。
contentType: "text/calendar; method=REQUEST"Forwarding Inbox
转发收件箱
Buy for $1/month. Emails are forwarded to your real address and/or retained for programmatic access.
username@x402email.com以每月1美元的价格购买。邮件会转发到你的真实邮箱,也可保留以便通过编程方式访问。
username@x402email.comBuy an Inbox
购买收件箱
bash
npx agentcash fetch https://stableemail.dev/api/inbox/buy -m POST -b '{
"username": "alice",
"forwardTo": "alice@gmail.com"
}'Omit to use as a programmatic-only mailbox (retainMessages auto-enabled).
forwardTobash
npx agentcash fetch https://stableemail.dev/api/inbox/buy -m POST -b '{
"username": "alice",
"forwardTo": "alice@gmail.com"
}'如果不需要转发,可以省略,将其作为仅编程访问的邮箱(自动启用消息保留功能)。
forwardToSend from Inbox
从收件箱发送邮件
bash
npx agentcash fetch https://stableemail.dev/api/inbox/send -m POST -b '{
"username": "alice",
"to": ["bob@example.com"],
"subject": "Hello",
"html": "<p>Hi Bob</p>",
"text": "Hi Bob"
}'bash
npx agentcash fetch https://stableemail.dev/api/inbox/send -m POST -b '{
"username": "alice",
"to": ["bob@example.com"],
"subject": "Hello",
"html": "<p>Hi Bob</p>",
"text": "Hi Bob"
}'Top Up Inbox
续费收件箱
bash
npx agentcash fetch https://stableemail.dev/api/inbox/topup -m POST -b '{"username": "alice"}'Anyone can top up any inbox. Top-ups stack. Bulk discounts: 90 days/$2.50 (17% off), 365 days/$8 (34% off).
bash
npx agentcash fetch https://stableemail.dev/api/inbox/topup -m POST -b '{"username": "alice"}'任何人都可以为任意收件箱续费。续费时长可叠加。批量折扣:90天2.5美元(优惠17%),365天8美元(优惠34%)。
Cancel and Refund
取消并退款
bash
npx agentcash fetch https://stableemail.dev/api/inbox/cancel -m POST -b '{"username": "alice"}'Returns pro-rata USDC refund on-chain automatically.
bash
npx agentcash fetch https://stableemail.dev/api/inbox/cancel -m POST -b '{"username": "alice"}'系统会自动在链上按比例退还USDC。
Read Inbox Messages
读取收件箱消息
Enable message retention, then read messages programmatically.
启用消息保留功能后,即可通过编程方式读取消息。
Enable Retention
启用消息保留
bash
npx agentcash fetch https://stableemail.dev/api/inbox/update -m POST -b '{"username": "alice", "retainMessages": true}'bash
npx agentcash fetch https://stableemail.dev/api/inbox/update -m POST -b '{"username": "alice", "retainMessages": true}'List Messages
列出消息
bash
npx agentcash fetch https://stableemail.dev/api/inbox/messages -m POST -b '{"username": "alice", "limit": 20}'bash
npx agentcash fetch https://stableemail.dev/api/inbox/messages -m POST -b '{"username": "alice", "limit": 20}'Read a Message
读取单条消息
bash
npx agentcash fetch https://stableemail.dev/api/inbox/messages/read -m POST -b '{"messageId": "msg_abc123"}'Returns full message with from, to, subject, date, text, html, and attachments.
bash
npx agentcash fetch https://stableemail.dev/api/inbox/messages/read -m POST -b '{"messageId": "msg_abc123"}'返回包含发件人、收件人、主题、日期、文本内容、HTML内容以及附件的完整消息。
Custom Subdomains
自定义子域名
Buy for $5 one-time. Send from any address on your subdomain for $0.005/email.
yourname.x402email.com一次性支付5美元购买。从子域名下的任意地址发送邮件,每封0.005美元。
yourname.x402email.comBuy a Subdomain
购买子域名
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/buy -m POST -b '{"subdomain": "yourname"}'Rules: 3-30 chars, lowercase alphanumeric + hyphens. DNS verification takes ~5 minutes.
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/buy -m POST -b '{"subdomain": "yourname"}'规则:3-30个字符,小写字母、数字及连字符。DNS验证大约需要5分钟。
Send from Subdomain
从子域名发送邮件
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/send -m POST -b '{
"from": "support@yourname.x402email.com",
"to": ["customer@example.com"],
"subject": "Your order confirmation",
"html": "<p>Thank you for your order!</p>"
}'bash
npx agentcash fetch https://stableemail.dev/api/subdomain/send -m POST -b '{
"from": "support@yourname.x402email.com",
"to": ["customer@example.com"],
"subject": "Your order confirmation",
"html": "<p>Thank you for your order!</p>"
}'Create Subdomain Inboxes
创建子域名收件箱
Create per-address inboxes on your subdomain ($0.25 each, max 100):
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/inbox/create -m POST -b '{
"subdomain": "yourname",
"localPart": "support",
"forwardTo": "team@company.com"
}'在你的子域名下创建单个地址的收件箱(每个0.25美元,最多100个):
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/inbox/create -m POST -b '{
"subdomain": "yourname",
"localPart": "support",
"forwardTo": "team@company.com"
}'Catch-All Forwarding
全域转发
Forward all unmatched addresses on your subdomain:
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/update -m POST -b '{"subdomain": "yourname", "catchAllForwardTo": "catch-all@company.com"}'将子域名下所有未匹配地址的邮件转发到指定邮箱:
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/update -m POST -b '{"subdomain": "yourname", "catchAllForwardTo": "catch-all@company.com"}'Manage Authorized Signers
管理授权签署人
Allow other wallets to send from your subdomain:
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/signers -m POST -b '{"action": "add", "subdomain": "yourname", "walletAddress": "0x..."}'允许其他钱包从你的子域名发送邮件:
bash
npx agentcash fetch https://stableemail.dev/api/subdomain/signers -m POST -b '{"action": "add", "subdomain": "yourname", "walletAddress": "0x..."}'Images in Emails
邮件中的图片
Host images on StableUpload or AgentUpload, then reference in HTML:
html
<img src="https://f.stableupload.dev/abc/photo.png" alt="Photo" />Most email clients strip data URIs — always use hosted URLs.
将图片托管在StableUpload或AgentUpload上,然后在HTML中引用:
html
<img src="https://f.stableupload.dev/abc/photo.png" alt="Photo" />大多数邮件客户端会剥离数据URI —— 请始终使用托管URL。
Workflows
工作流
Quick Send
快速发送邮件
- (Optional) Check balance:
npx agentcash wallet info - Send email via
/api/send - Confirm delivery via messageId
- (可选)检查余额:
npx agentcash wallet info - 通过发送邮件
/api/send - 通过messageId确认送达
Set Up Professional Email
设置专业邮箱
- Buy subdomain ($5)
- Wait for DNS verification (~5 min)
- Create inboxes for team members ($0.25 each)
- Set up catch-all forwarding
- Send from custom addresses ($0.005 each)
- 购买子域名(5美元)
- 等待DNS验证(约5分钟)
- 为团队成员创建收件箱(每个0.25美元)
- 设置全域转发
- 从自定义地址发送邮件(每封0.005美元)
Programmatic Mailbox
编程式邮箱
- Buy inbox with no forwardTo ($1)
- Messages are retained automatically
- List and read messages via API ($0.001 each)
- Delete messages when processed (free)
- 购买不设置forwardTo的收件箱(1美元)
- 消息会自动保留
- 通过API列出和读取消息(每条0.001美元)
- 处理完成后删除消息(免费)
Cost Estimation
成本估算
| Task | Cost |
|---|---|
| Send one email (shared) | $0.02 |
| Send one email (subdomain/inbox) | $0.005 |
| Buy inbox (30 days) | $1.00 |
| Buy inbox (1 year) | $1.00 + $8.00 = $9.00 |
| Buy subdomain + 5 inboxes | $5.00 + $1.25 = $6.25 |
| Read 100 messages | $0.10 |
| 任务 | 成本 |
|---|---|
| 发送一封邮件(共享地址) | $0.02 |
| 发送一封邮件(子域名/收件箱) | $0.005 |
| 购买收件箱(30天) | $1.00 |
| 购买收件箱(1年) | $1.00 + $8.00 = $9.00 |
| 购买子域名 + 5个收件箱 | $5.00 + $1.25 = $6.25 |
| 读取100条消息 | $0.10 |