← 返回
沟通协作 Key 中文

Mailtarget Email

Send transactional and marketing emails via Mailtarget API. Manage sending domains, templates, API keys, and sub-accounts. Use when the agent needs to send e...
通过 Mailtarget API 发送事务性和营销邮件;管理发件域名、模板、API 密钥及子账户。用于代理需发送邮件时。
masasdani
沟通协作 clawhub v1.2.0 1 版本 99822.5 Key: 需要
★ 2
Stars
📥 1,085
下载
💾 22
安装
1
版本
#latest

概述

Mailtarget Email

Send emails and manage email infrastructure via the Mailtarget API.

Setup

Set the MAILTARGET_API_KEY environment variable with your Mailtarget API key.

Get your API key from the Mailtarget dashboard → Settings → API Keys.

Sending Email

Use curl or any HTTP client. All requests go to https://transmission.mailtarget.co/v1 with Authorization: Bearer $MAILTARGET_API_KEY.

Simple send

curl -X POST https://transmission.mailtarget.co/v1/layang/transmissions \
  -H "Authorization: Bearer $MAILTARGET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": [{"email": "recipient@example.com", "name": "Recipient"}],
    "from": {"email": "noreply@yourdomain.com", "name": "Your App"},
    "subject": "Hello from Mailtarget",
    "bodyHtml": "<h1>Hello!</h1><p>This is a test email.</p>",
    "bodyText": "Hello! This is a test email."
  }'

A successful response returns {"message": "Transmission received", "transmissionId": "..."}.

Template-based send

Use templateId with substitutionData instead of bodyHtml/bodyText:

{
  "to": [{"email": "user@example.com", "name": "User"}],
  "from": {"email": "noreply@yourdomain.com", "name": "Your App"},
  "subject": "Welcome, {{name}}!",
  "templateId": "welcome-template",
  "substitutionData": {"name": "User", "company": "Acme"}
}

Tracking options

Control click and open tracking per transmission:

{
  "optionsAttributes": {
    "clickTracking": true,
    "openTracking": true,
    "transactional": true
  }
}

Set transactional: true for transactional emails (password resets, receipts) to bypass unsubscribe preferences.

Attachments

Include base64-encoded attachments:

{
  "attachments": [{
    "filename": "report.pdf",
    "mimeType": "application/pdf",
    "value": "<base64-encoded-content>"
  }]
}

Managing Templates

  • List: GET /template?page=1&size=10&search=keyword
  • Create: POST /template with {"id": "slug", "name": "Display Name", "html": "..."}

Managing Sending Domains

  • List: GET /domain/sending
  • Create: POST /domain/sending with {"domain": "example.com"}
  • Verify: PUT /domain/sending/{id}/verify-txt
  • Check SPF: GET /domain/sending/{id}/spf-suggestion

Autonomous Domain Setup (with cloudflare-dns skill)

When paired with the cloudflare-dns skill, the agent can set up a sending domain end-to-end with zero manual DNS editing:

  1. Create sending domain: POST /domain/sending with {"domain": "example.com"}
  2. Read required DNS records from the response: spfHostname, spfValue, dkimHostname, dkimValue, cnameHostname, cnameValue
  3. Add SPF TXT record in Cloudflare using spfHostname and spfValue
  4. Add DKIM TXT record in Cloudflare using dkimHostname and dkimValue
  5. Add CNAME record in Cloudflare using cnameHostname and cnameValue (set proxied: false)
  6. Verify domain: PUT /domain/sending/{id}/verify-txt
  7. Confirm status via GET /domain/sending/{id} — check spfVerified, dkimVerified, cnameVerified

Install the companion skill: clawhub install cloudflare-dns

Getting Started

New to Mailtarget + OpenClaw? See references/getting-started.md for a 5-minute setup guide.

Full API Reference

See references/api.md for complete endpoint documentation including API key management, sub-accounts, and permissions.

版本历史

共 1 个版本

  • v1.2.0 当前
    2026-03-29 12:15 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,680
developer-tools

SPF DKIM Setup

masasdani
通过 Cloudflare API 管理 DNS 记录。支持创建、列出、更新和删除 A、AAAA、CNAME、TXT、MX、SPF、DKIM 等记录。适用于代理需要添加...
★ 0 📥 800
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,587