mcpField
Z
zeabur-email

zeabur-email

github.com/zeaburクラウド・DevOps39151 回インストール7 週間前に更新
リポジトリ

zeabur-email について

Zeabur CLIでZeabur Email(ZSend)を管理し、REST API経由でメールを送信するスキルです。ドメイン、APIキー、Webhook、メールサービスの状態を扱います。

主な機能

  1. 01メールサービス状態の確認
  2. 02ドメインの追加と検証
  3. 03APIキーの管理
  4. 04イベントWebhookの設定
  5. 05REST API経由のメール送信

活用シーン

  1. 01ZSendの利用開始状態の確認
  2. 02送信ドメインとDNSレコードの設定
  3. 03送信または読み取り用キーの作成
  4. 04配信や反応イベントの追跡

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/zeabur/agent-skills --skill zeabur-email

インストール後、Claude Code で/zeabur-emailを入力して読み込まれたか確認します。

詳細

Zeabur メール(ZSend)管理

Zeabur CLI を実行するときは、必ず npx zeabur@latest を使用してください。 zeabur を直接実行したり、ほかのインストール方法を使用したりしないでください。npx が利用できない場合は、先に Node.js をインストールしてください。

メールサービスのステータスを確認する

npx zeabur@latest email status -i=false
npx zeabur@latest email status -i=false --json

オンボーディングのステータスとアカウント情報を表示します。

ドメイン管理

# List all domains
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

# Get domain details and DNS records
npx zeabur@latest email domains get --id <domain-id> -i=false

# Verify domain DNS records
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

対応リージョン: us-east-1、us-west-1、eu-central-1、ap-northeast-1、ap-northeast-3、ap-southeast-1

ドメイン設定のワークフロー
# 1. Add the domain
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)
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
npx zeabur@latest email domains verify --id <domain-id> -i=false

API キー管理

# List all keys
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

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

権限: all、send_only、read_only

トークンが表示されるのは作成時の一度だけです。 ユーザーがすぐに保存するようにしてください。

Webhook 管理

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

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

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

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

対応イベント: send、delivery、bounce、complaint、reject、open、click

Webhook シークレットが表示されるのは作成時の一度だけです。 ユーザーがすぐに保存するようにしてください。

メールを送信する

curl を使って REST API に直接アクセスします。エンドポイントは https://api.zeabur.com/api/v1/zsend/emails です。

curl -X POST https://api.zeabur.com/api/v1/zsend/emails \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <api-key>" \
  -d '{
    "from": "[email protected]",
    "to": ["[email protected]"],
    "subject": "Hello from Zeabur Email",
    "html": "<h1>Hello!</h1><p>This is a test email.</p>",
    "text": "Hello! This is a test email."
  }'
  • from:検証済みドメインを使用する必要があります(例:[email protected])
  • to:受信者のメールアドレスの配列
  • subject:メールの件名
  • html:HTML 本文(text が指定されている場合は省略可能)
  • text:プレーンテキストの本文(html が指定されている場合は省略可能)

API キーには send_only または all の権限が必要です。キーがまだない場合は、先に作成してください(上記の「API キー管理」を参照)。

コメント