email

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Email with StableEmail

使用StableEmail处理邮件

Send emails, manage inboxes, and run custom subdomains via x402 payments at
https://stableemail.dev
.
通过x402支付,在
https://stableemail.dev
上发送邮件、管理收件箱以及运行自定义子域名。

Setup

设置

See rules/getting-started.md for installation and wallet setup.
安装和钱包设置请查看rules/getting-started.md

Quick Reference

快速参考

TaskEndpointPrice
Send email (shared)
https://stableemail.dev/api/send
$0.02
Buy subdomain
https://stableemail.dev/api/subdomain/buy
$5.00
Send from subdomain
https://stableemail.dev/api/subdomain/send
$0.005
Buy inbox
https://stableemail.dev/api/inbox/buy
$1.00
Send from inbox
https://stableemail.dev/api/inbox/send
$0.005
Top up inbox (30d)
https://stableemail.dev/api/inbox/topup
$1.00
Top up inbox (90d)
https://stableemail.dev/api/inbox/topup/quarter
$2.50
Top up inbox (365d)
https://stableemail.dev/api/inbox/topup/year
$8.00
List inbox messages
https://stableemail.dev/api/inbox/messages
$0.001
Read inbox message
https://stableemail.dev/api/inbox/messages/read
$0.001
Create subdomain inbox
https://stableemail.dev/api/subdomain/inbox/create
$0.25
List subdomain messages
https://stableemail.dev/api/subdomain/inbox/messages
$0.001
Read subdomain message
https://stableemail.dev/api/subdomain/inbox/messages/read
$0.001
任务接口价格
发送邮件(共享地址)
https://stableemail.dev/api/send
$0.02
购买子域名
https://stableemail.dev/api/subdomain/buy
$5.00
从子域名发送邮件
https://stableemail.dev/api/subdomain/send
$0.005
购买收件箱
https://stableemail.dev/api/inbox/buy
$1.00
从收件箱发送邮件
https://stableemail.dev/api/inbox/send
$0.005
续费收件箱(30天)
https://stableemail.dev/api/inbox/topup
$1.00
续费收件箱(90天)
https://stableemail.dev/api/inbox/topup/quarter
$2.50
续费收件箱(365天)
https://stableemail.dev/api/inbox/topup/year
$8.00
列出收件箱消息
https://stableemail.dev/api/inbox/messages
$0.001
读取收件箱消息
https://stableemail.dev/api/inbox/messages/read
$0.001
创建子域名收件箱
https://stableemail.dev/api/subdomain/inbox/create
$0.25
列出子域名消息
https://stableemail.dev/api/subdomain/inbox/messages
$0.001
读取子域名消息
https://stableemail.dev/api/subdomain/inbox/messages/read
$0.001

Free Management Endpoints

免费管理接口

TaskEndpoint
Subdomain status
GET https://stableemail.dev/api/subdomain/status?subdomain=name
Update subdomain
POST https://stableemail.dev/api/subdomain/update
Manage signers
POST https://stableemail.dev/api/subdomain/signers
Inbox status
GET https://stableemail.dev/api/inbox/status?username=name
Update inbox
POST https://stableemail.dev/api/inbox/update
Cancel inbox
POST https://stableemail.dev/api/inbox/cancel
Delete message
POST https://stableemail.dev/api/inbox/messages/delete
List subdomain inboxes
POST https://stableemail.dev/api/subdomain/inbox/list
Delete subdomain inbox
POST https://stableemail.dev/api/subdomain/inbox/delete
Update subdomain inbox
POST https://stableemail.dev/api/subdomain/inbox/update
Delete subdomain message
POST https://stableemail.dev/api/subdomain/inbox/messages/delete
Free endpoints use SIWX wallet authentication (handled automatically by
npx agentcash fetch
).
任务接口
子域名状态
GET https://stableemail.dev/api/subdomain/status?subdomain=name
更新子域名
POST https://stableemail.dev/api/subdomain/update
管理签署人
POST https://stableemail.dev/api/subdomain/signers
收件箱状态
GET https://stableemail.dev/api/inbox/status?username=name
更新收件箱
POST https://stableemail.dev/api/inbox/update
取消收件箱
POST https://stableemail.dev/api/inbox/cancel
删除消息
POST https://stableemail.dev/api/inbox/messages/delete
列出子域名收件箱
POST https://stableemail.dev/api/subdomain/inbox/list
删除子域名收件箱
POST https://stableemail.dev/api/subdomain/inbox/delete
更新子域名收件箱
POST https://stableemail.dev/api/subdomain/inbox/update
删除子域名消息
POST https://stableemail.dev/api/subdomain/inbox/messages/delete
免费接口使用SIWX钱包认证(由
npx agentcash fetch
自动处理)。

Send an Email

发送邮件

Send from the shared
relay@x402email.com
address:
bash
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:
  • to
    — array of recipient emails (required)
  • subject
    — email subject (required)
  • html
    and/or
    text
    — email body (at least one required)
  • replyTo
    — reply-to address (optional but recommended)
  • attachments
    — array of
    {content, contentType, filename}
    (optional, max 5, base64 encoded, ~3.75MB limit each)
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.com
发送邮件:
bash
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
    {content, contentType, filename}
    数组(可选,最多5个,base64编码,单个文件约3.75MB限制)
附件示例:
json
{
  "attachments": [{
    "content": "base64-encoded-content...",
    "contentType": "application/pdf",
    "filename": "report.pdf"
  }]
}
若要发送日历邀请,请使用
contentType: "text/calendar; method=REQUEST"

Forwarding Inbox

转发收件箱

Buy
username@x402email.com
for $1/month. Emails are forwarded to your real address and/or retained for programmatic access.
以每月1美元的价格购买
username@x402email.com
。邮件会转发到你的真实邮箱,也可保留以便通过编程方式访问。

Buy an Inbox

购买收件箱

bash
npx agentcash fetch https://stableemail.dev/api/inbox/buy -m POST -b '{
  "username": "alice",
  "forwardTo": "alice@gmail.com"
}'
Omit
forwardTo
to use as a programmatic-only mailbox (retainMessages auto-enabled).
bash
npx agentcash fetch https://stableemail.dev/api/inbox/buy -m POST -b '{
  "username": "alice",
  "forwardTo": "alice@gmail.com"
}'
如果不需要转发,可以省略
forwardTo
,将其作为仅编程访问的邮箱(自动启用消息保留功能)。

Send 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
yourname.x402email.com
for $5 one-time. Send from any address on your subdomain for $0.005/email.
一次性支付5美元购买
yourname.x402email.com
。从子域名下的任意地址发送邮件,每封0.005美元。

Buy 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

成本估算

TaskCost
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