← 返回 Skills 市场
masasdani

Mailtarget Email

作者 Masas Dani · GitHub ↗ · v1.2.0
cross-platform ⚠ suspicious
642
总下载
2
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

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 /template with {"id": "slug", "name": "Display Name", "html": "\x3Chtml>..."}

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.

安全使用建议
This skill appears to do what it says (send/manage Mailtarget emails) but the published metadata does not list the environment variables the SKILL.md requires. Before installing: 1) Plan to set MAILTARGET_API_KEY in a secure gateway/environment variable (the skill uses Authorization: Bearer $MAILTARGET_API_KEY). 2) If you enable autonomous domain setup, only provide a Cloudflare API token scoped with the minimum DNS write permissions and, if possible, restricted to the specific zone(s) the skill needs (CLOUDFLARE_API_TOKEN and CLOUDFLARE_ZONE_ID). 3) Consider keeping autonomous invocation off or require manual approval for DNS changes and bulk sends. 4) Test with a non-production/test domain and test Mailtarget key to verify behavior. 5) Rotate keys and revoke tokens you provided to the agent if you stop using the skill. The main risk is undisclosed credential requirements and the ability to modify DNS; those are legitimate for this skill but must be provisioned carefully.
功能分析
Type: OpenClaw Skill Name: mailtarget-email Version: 1.2.0 The skill is designed to manage email infrastructure, including sending emails and configuring sending domains. It requires access to sensitive API keys (`MAILTARGET_API_KEY`, `CLOUDFLARE_API_TOKEN`) and instructs the OpenClaw agent to perform high-privilege actions, specifically modifying DNS records (SPF, DKIM, CNAME) via the `cloudflare-dns` skill for 'Autonomous Domain Setup' as detailed in `SKILL.md` and `references/getting-started.md`. While this functionality is for a stated purpose, the ability for an AI agent to programmatically modify DNS records based on natural language prompts introduces a significant attack surface for prompt injection or misuse, classifying it as suspicious due to high-risk capabilities without direct evidence of malicious intent within the skill itself.
能力评估
Purpose & Capability
The name/description and SKILL.md consistently describe Mailtarget email and domain management functionality, which is coherent. However the package metadata declares no required environment variables or primary credential while the SKILL.md explicitly requires MAILTARGET_API_KEY (and, for autonomous domain setup, Cloudflare credentials). The metadata omission is an incoherence that matters for permissioning and automated audits.
Instruction Scope
The runtime instructions stay within the advertised scope (sending emails, managing templates, creating/verifying sending domains). They provide curl examples and a clear domain-setup flow. They also enable an autonomous end-to-end DNS workflow (via an optional cloudflare-dns companion) that will read DNS values from Mailtarget and create/modify DNS records in Cloudflare. The instructions do not instruct reading unrelated local files, but they do grant the agent broad discretion to 'handle the rest' (build HTML, send campaigns), which is functionally expected but operationally broad.
Install Mechanism
This is an instruction-only skill with no install spec and no code files — lowest install risk (nothing is written or executed on disk by the skill itself).
Credentials
Metadata lists no environment variables, but SKILL.md requires MAILTARGET_API_KEY. For autonomous domain setup it also instructs storing CLOUDFLARE_API_TOKEN and CLOUDFLARE_ZONE_ID. A Cloudflare token with DNS Write permission is high privilege. The skill should have declared these required credentials (primaryEnv), and users should be warned to use least-privilege tokens and to scope the token to specific zones where possible.
Persistence & Privilege
always:false and autonomous model invocation enabled (default) — normal. However, combined with the domain-setup flow that can modify DNS when cloudflare credentials are provided, the agent can perform impactful changes autonomously. Consider restricting autonomous invocation or requiring explicit user approval for DNS changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install mailtarget-email
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /mailtarget-email 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
Added autonomous domain setup workflow with spf-dkim-setup companion skill
v1.1.0
Added getting-started guide — 5-minute setup from install to first email
v1.0.0
Initial release — send transactional and marketing emails, manage templates, sending domains, and API keys via Mailtarget API
元数据
Slug mailtarget-email
版本 1.2.0
许可证
累计安装 0
当前安装数 0
历史版本数 3
常见问题

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。

💬 留言讨论