zeabur-email

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Zeabur Email (ZSend) Management

Zeabur Email (ZSend) 管理

Always use
npx zeabur@latest
to invoke Zeabur CLI.
Never use
zeabur
directly or any other installation method. If
npx
is not available, install Node.js first.
请始终使用
npx zeabur@latest
调用 Zeabur CLI。
不要直接使用
zeabur
命令或任何其他安装方式。如果
npx
不可用,请先安装 Node.js。

Check Email Service Status

检查邮件服务状态

bash
npx zeabur@latest email status -i=false
npx zeabur@latest email status -i=false --json
Shows onboarding status and account info.
bash
npx zeabur@latest email status -i=false
npx zeabur@latest email status -i=false --json
展示接入状态和账户信息。

Domain Management

域名管理

bash
undefined
bash
undefined

List all domains

列出所有域名

npx zeabur@latest email domains list -i=false npx zeabur@latest email domains ls -i=false --json
npx zeabur@latest email domains list -i=false npx zeabur@latest email domains ls -i=false --json

Add a domain

添加域名

npx zeabur@latest email domains add --domain example.com --region us-east-1 -i=false
npx zeabur@latest email domains add --domain example.com --region us-east-1 -i=false

Get domain details and DNS records

获取域名详情和DNS记录

npx zeabur@latest email domains get --id <domain-id> -i=false
npx zeabur@latest email domains get --id <domain-id> -i=false

Verify domain DNS records

验证域名DNS记录

npx zeabur@latest email domains verify --id <domain-id> -i=false
npx zeabur@latest email domains verify --id <domain-id> -i=false

Delete a domain

删除域名

npx zeabur@latest email domains delete --id <domain-id> -i=false

**Supported regions:** `us-east-1`, `us-west-1`, `eu-central-1`, `ap-northeast-1`, `ap-northeast-3`, `ap-southeast-1`
npx zeabur@latest email domains delete --id <domain-id> -i=false

**支持的区域:** `us-east-1`, `us-west-1`, `eu-central-1`, `ap-northeast-1`, `ap-northeast-3`, `ap-southeast-1`

Domain Setup Workflow

域名设置流程

bash
undefined
bash
undefined

1. Add the domain

1. 添加域名

npx zeabur@latest email domains add --domain example.com --region us-east-1 -i=false --json
npx zeabur@latest email domains add --domain example.com --region us-east-1 -i=false --json

2. Get DNS records to configure (note the domain ID from step 1)

2. 获取需要配置的DNS记录(记录步骤1返回的域名ID)

npx zeabur@latest email domains get --id <domain-id> -i=false
npx zeabur@latest email domains get --id <domain-id> -i=false

3. Configure the required DNS records using the
zeabur-domain-dns
skill, then verify

3. 使用
zeabur-domain-dns
skill 配置所需的DNS记录,然后进行验证

npx zeabur@latest email domains verify --id <domain-id> -i=false
undefined
npx zeabur@latest email domains verify --id <domain-id> -i=false
undefined

API Key Management

API Key管理

bash
undefined
bash
undefined

List all keys

列出所有密钥

npx zeabur@latest email keys list -i=false npx zeabur@latest email keys ls -i=false --json
npx zeabur@latest email keys list -i=false npx zeabur@latest email keys ls -i=false --json

Create a key

创建密钥

npx zeabur@latest email keys create --name "production" --permission send_only -i=false
npx zeabur@latest email keys create --name "production" --permission send_only -i=false

Delete a key

删除密钥

npx zeabur@latest email keys delete --id <key-id> -i=false

**Permissions:** `all`, `send_only`, `read_only`

**The token is only shown once at creation time.** Make sure the user saves it immediately.
npx zeabur@latest email keys delete --id <key-id> -i=false

**权限类型:** `all`, `send_only`, `read_only`

**令牌仅在创建时展示一次,请确保用户立即保存。**

Webhook Management

Webhook管理

bash
undefined
bash
undefined

List all webhooks

列出所有Webhook

npx zeabur@latest email webhooks list -i=false npx zeabur@latest email webhooks ls -i=false --json
npx zeabur@latest email webhooks list -i=false npx zeabur@latest email webhooks ls -i=false --json

Create a webhook

创建Webhook

npx zeabur@latest email webhooks create
--name "delivery-tracker"
--endpoint "https://example.com/webhook"
--events "delivery,bounce"
-i=false
npx zeabur@latest email webhooks create
--name "delivery-tracker"
--endpoint "https://example.com/webhook"
--events "delivery,bounce"
-i=false

Verify a webhook

验证Webhook

npx zeabur@latest email webhooks verify --id <webhook-id> -i=false
npx zeabur@latest email webhooks verify --id <webhook-id> -i=false

Delete a webhook

删除Webhook

npx zeabur@latest email webhooks delete --id <webhook-id> -i=false

**Supported events:** `send`, `delivery`, `bounce`, `complaint`, `reject`, `open`, `click`

**The webhook secret is only shown once at creation time.** Make sure the user saves it immediately.
npx zeabur@latest email webhooks delete --id <webhook-id> -i=false

**支持的事件:** `send`, `delivery`, `bounce`, `complaint`, `reject`, `open`, `click`

**Webhook密钥仅在创建时展示一次,请确保用户立即保存。**

Send an Email

发送邮件

Use the REST API directly with
curl
. The endpoint is
https://api.zeabur.com/api/v1/zsend/emails
.
bash
curl -X POST https://api.zeabur.com/api/v1/zsend/emails \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <api-key>" \
  -d '{
    "from": "sender@example.com",
    "to": ["recipient@example.com"],
    "subject": "Hello from Zeabur Email",
    "html": "<h1>Hello!</h1><p>This is a test email.</p>",
    "text": "Hello! This is a test email."
  }'
  • from
    : Must use a verified domain (e.g.,
    noreply@example.com
    )
  • to
    : Array of recipient email addresses
  • subject
    : Email subject line
  • html
    : HTML body (optional if
    text
    is provided)
  • text
    : Plain text body (optional if
    html
    is provided)
The API key must have
send_only
or
all
permission. If no key exists, create one first (see API Key Management above).
直接使用
curl
调用REST API,接口地址为
https://api.zeabur.com/api/v1/zsend/emails
bash
curl -X POST https://api.zeabur.com/api/v1/zsend/emails \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <api-key>" \
  -d '{
    "from": "sender@example.com",
    "to": ["recipient@example.com"],
    "subject": "Hello from Zeabur Email",
    "html": "<h1>Hello!</h1><p>This is a test email.</p>",
    "text": "Hello! This is a test email."
  }'
  • from
    : 必须使用已验证的域名(例如
    noreply@example.com
  • to
    : 收件人邮箱地址数组
  • subject
    : 邮件主题
  • html
    : HTML格式正文(如果提供了
    text
    则为可选)
  • text
    : 纯文本格式正文(如果提供了
    html
    则为可选)
API密钥必须拥有
send_only
all
权限。如果没有可用的密钥,请先创建一个(参考上方的API Key管理部分)。