Mailtarget Email
/install mailtarget-email
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": "[email protected]", "name": "Recipient"}],
"from": {"email": "[email protected]", "name": "Your App"},
"subject": "Hello from Mailtarget",
"bodyHtml": "\x3Ch1>Hello!\x3C/h1>\x3Cp>This is a test email.\x3C/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": "[email protected]", "name": "User"}],
"from": {"email": "[email protected]", "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": "\x3Cbase64-encoded-content>"
}]
}
Managing Templates
- List:
GET /template?page=1&size=10&search=keyword - Create:
POST /templatewith{"id": "slug", "name": "Display Name", "html": "\x3Chtml>..."}
Managing Sending Domains
- List:
GET /domain/sending - Create:
POST /domain/sendingwith{"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:
- Create sending domain:
POST /domain/sendingwith{"domain": "example.com"} - Read required DNS records from the response:
spfHostname,spfValue,dkimHostname,dkimValue,cnameHostname,cnameValue - Add SPF TXT record in Cloudflare using
spfHostnameandspfValue - Add DKIM TXT record in Cloudflare using
dkimHostnameanddkimValue - Add CNAME record in Cloudflare using
cnameHostnameandcnameValue(setproxied: false) - Verify domain:
PUT /domain/sending/{id}/verify-txt - Confirm status via
GET /domain/sending/{id}— checkspfVerified,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.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install mailtarget-email - 安装完成后,直接呼叫该 Skill 的名称或使用
/mailtarget-email触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 642 次。
如何安装 Mailtarget Email?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install mailtarget-email」即可一键安装,无需额外配置。
Mailtarget Email 是免费的吗?
是的,Mailtarget Email 完全免费(开源免费),可自由下载、安装和使用。
Mailtarget Email 支持哪些平台?
Mailtarget Email 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Mailtarget Email?
由 Masas Dani(@masasdani)开发并维护,当前版本 v1.2.0。