← 返回 Skills 市场
code-by-ai

uspeedo-email-sending-channel

作者 code-by-ai · GitHub ↗ · v1.1.2 · MIT-0
cross-platform ✓ 安全检测通过
369
总下载
0
收藏
0
当前安装
12
版本数
在 OpenClaw 中安装
/install uspeedo-email-sending-channel
功能描述
Sends user-authorized transactional email via uSpeedo API with ACCESSKEY credentials (env preferred). Before SendEmail, calls GetSenderList to resolve SendEm...
使用说明 (SKILL.md)

Send Email via uSpeedo Sending Channel

Before You Use (Installation Considerations)

  1. Platform key handling: Confirm how your AI platform handles credentials and conversation history. Do not paste long-lived keys into chat unless the platform provides a temporary or secret input mechanism.
  2. Key practice: Prefer short-lived or least-privilege API keys for testing; rotate keys after testing if they were exposed.
  3. Credentials in metadata (OpenClaw): Frontmatter declares metadata.openclaw.requires.env (ACCESSKEY_ID, ACCESSKEY_SECRET) and metadata.openclaw.primaryEnv (ACCESSKEY_SECRET). Integrations and registries should surface these so users know key requirements before use.
  4. Email content: The skill sends the user’s raw plain text or HTML. Avoid sending sensitive content or unvalidated HTML to prevent abuse or leakage.
  5. If in doubt: If you cannot verify how the platform stores keys or how uSpeedo is used, treat credentials as highly sensitive and use one-time or test credentials only.

Platform persistence: This skill instructs the agent not to persist keys, but conversation context or platform logs may still retain user input. Prefer platforms that support ephemeral or secure credential input.

Credentials and Environment Variables

Prefer environment variables over user-provided credentials whenever possible.

Variable Required Purpose
ACCESSKEY_ID Yes uSpeedo API Basic auth (ID)
ACCESSKEY_SECRET Yes uSpeedo API Basic auth (Secret)

Obtaining environment variables (ACCESSKEY_ID / ACCESSKEY_SECRET): Go to Email API Key management to create or view API keys, and set them in .env or your system environment. If both environment variables and user-provided keys are present, environment variables take precedence. Keys are for authenticating the current request only; do not cache or persist them, and do not commit .env to version control.

Usage Restrictions (Mandatory)

  • Do not cache or persist user-provided sensitive information: ACCESSKEY_ID and ACCESSKEY_SECRET are for authenticating the current request only. They must not be written to session memory, knowledge base, cache, logs, code, or any storage that can be read later; after the call completes they are considered consumed and must not be retained or referenced.
  • No hidden sending: Never send email automatically. Always require an explicit user confirmation in the current turn for sender, recipients, subject, and final content.
  • No credential echoing: Never print, log, or repeat Authorization header, ACCESSKEY_SECRET, or full raw request/response payloads.
  • Fail closed on missing credentials: If environment variables are unavailable and user does not provide valid keys, stop and ask for required setup instead of attempting partial calls.

Mandatory Safety Gates Before Sending

Run these checks before every send request:

  1. Parameter confirmation gate (required):
    • Resolve SendEmail first (see "Get Sender List and SendEmail resolution" below), then confirm SendEmail, all TargetEmailAddress, Subject, and Content with the user in the same turn.
    • If any required field is missing/ambiguous, stop and ask for correction.
  2. Recipient format gate (required):
    • Reject obviously invalid emails (missing @, missing domain, empty items, non-string entries).
    • De-duplicate recipients before sending.
  3. HTML safety gate (required for HTML content):
    • If content is HTML, warn the user that active content is not allowed.
    • Reject or require user rewrite when HTML contains risky patterns such as \x3Cscript, \x3Ciframe, \x3Cobject, \x3Cembed, \x3Cform, inline event handlers like onload=, or javascript: URLs.
    • Prefer plain text when possible.
  4. Scope gate (required):
    • This skill is for user-requested transactional/notification sending via uSpeedo API only.
    • If the user asks for deceptive, phishing, credential-harvesting, or policy-violating email, refuse to send.

When to Use

  • When the user asks the Agent to "send email" or "send an email"
  • When the user provides recipients, email content, and is willing to provide uSpeedo platform keys

When asking the user to provide or confirm any send parameters (recipients, sender, subject, content, credentials), always show the guidance in "Notes for Users" (ACCESSKEY_ID/ACCESSKEY_SECRET obtain link and deliverability/domain link).

Prerequisites

  1. Registration: The user has registered an account at uSpeedo.
  2. Obtain keys (environment variables): Get API keys from Email API Key management and set them as ACCESSKEY_ID and ACCESSKEY_SECRET (e.g. in .env).

Before calling the send API, confirm with the user that these steps are done; if not, direct them to register and obtain keys at the link above.

Information the User Must Provide

Parameter Required Description
Message content Yes Plain text or HTML string
ACCESSKEY_ID Yes Platform AccessKey ID (env or params)
ACCESSKEY_SECRET Yes Platform AccessKey Secret (env or params)
Recipients Yes One or more email addresses
Sender email (SendEmail) Conditional If the user does not specify: call GetSenderList, then use the first suitable sender’s Email (see resolution rules). The user may always provide or override SendEmail explicitly.
Subject Yes Email subject
Sender display name No FromName, e.g. "USpeedo"

Get Sender List and SendEmail resolution

Official API reference: GetSenderList.

When to call: After credentials are available and before SendEmail, unless the user has already given a definitive SendEmail for this send (then you may skip the list call).

Endpoint: GET https://api.uspeedo.com/api/v1/email/GetSenderList

Headers:

  • Accept: application/json
  • Authorization: Basic \x3Cbase64(ACCESSKEY_ID:ACCESSKEY_SECRET)>

Query string (common defaults; all parameters are query-based per docs):

  • Page=0 (page index starts at 0)
  • NumPerPage=20 (max 200)
  • OrderBy=create_time or update_time
  • OrderType=desc

Optional filters: Email, Domain, SenderType, FuzzySearch — use when the user wants a specific sender.

Response (user-safe handling):

  • On success, RetCode is 0. Read Data (array of sender objects).
  • Each item includes at least: Email, Status (e.g. 1 enabled, 0 disabled), Alias, etc.

Default resolution for SendEmail (if user did not specify):

  1. If Data is empty or missing: stop; tell the user to add/enable a sender in the Email console / domain & sender settings, or provide SendEmail explicitly.
  2. Prefer the first item in Data where Status === 1 (enabled). If none, fall back to the first item in Data and warn that it may be disabled.
  3. Set SendEmail to that item’s Email string.
  4. User override: If the user supplies SendEmail, use it (after format validation). Optionally call GetSenderList with Email filter to verify it exists when helpful.

Confirmation: Present the resolved SendEmail (and optionally Alias / domain from the same row) to the user with recipients, subject, and content before calling SendEmail.

How to Call SendEmail

Endpoint: POST https://api.uspeedo.com/api/v1/email/SendEmail

Headers:

  • Content-Type: application/json
  • Authorization: Basic \x3Cbase64(ACCESSKEY_ID:ACCESSKEY_SECRET)>

Request body (JSON):

{
  "SendEmail": "[email protected]",
  "TargetEmailAddress": ["[email protected]", "[email protected]"],
  "Subject": "Email subject",
  "Content": "\x3Chtml>\x3Cbody>...\x3C/body>\x3C/html>",
  "FromName": "Sender display name"
}
  • Content: Plain text or HTML. Use the user’s content as-is for plain text; use directly for HTML.
  • Content safety: For HTML, pass content only after the "HTML safety gate" above is satisfied.
  • TargetEmailAddress: Array with at least one recipient email.

Example (JavaScript/Node)

Credentials are read from environment variables first; params is used as fallback. Resolve SendEmail via GetSenderList when sendEmail is omitted.

function basicAuthHeader(accessKeyId, accessKeySecret) {
  const token = Buffer.from(`${accessKeyId}:${accessKeySecret}`).toString('base64');
  return `Basic ${token}`;
}

/** GET GetSenderList — see https://uspeedo.com/docs/products/email/api/GetSenderList */
async function getSenderList(accessKeyId, accessKeySecret, query = {}) {
  const qs = new URLSearchParams({
    Page: '0',
    NumPerPage: '20',
    OrderBy: 'create_time',
    OrderType: 'desc',
    ...query
  });
  const url = `https://api.uspeedo.com/api/v1/email/GetSenderList?${qs}`;
  const res = await fetch(url, {
    method: 'GET',
    headers: {
      Accept: 'application/json',
      Authorization: basicAuthHeader(accessKeyId, accessKeySecret)
    }
  });
  return res.json();
}

function pickDefaultSendEmail(listResponse) {
  const rows = listResponse?.Data;
  if (!Array.isArray(rows) || rows.length === 0) return null;
  const enabled = rows.find((r) => r && r.Status === 1 && r.Email);
  const first = rows.find((r) => r && r.Email);
  return (enabled || first)?.Email ?? null;
}

async function sendEmailViaUSpeedo(params = {}) {
  const accessKeyId = process.env.ACCESSKEY_ID || params.accessKeyId;
  const accessKeySecret = process.env.ACCESSKEY_SECRET || params.accessKeySecret;
  const {
    sendEmail: userSendEmail,
    targetEmails,
    subject,
    content,
    fromName = ''
  } = params;

  let sendEmail = userSendEmail;
  if (!sendEmail) {
    const listJson = await getSenderList(accessKeyId, accessKeySecret);
    if (listJson?.RetCode !== 0) {
      return { error: 'GetSenderList failed', detail: listJson };
    }
    sendEmail = pickDefaultSendEmail(listJson);
    if (!sendEmail) {
      return { error: 'No sender in GetSenderList; add a sender in console or pass sendEmail' };
    }
  }

  const auth = Buffer.from(`${accessKeyId}:${accessKeySecret}`).toString('base64');
  const res = await fetch('https://api.uspeedo.com/api/v1/email/SendEmail', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: `Basic ${auth}`
    },
    body: JSON.stringify({
      SendEmail: sendEmail,
      TargetEmailAddress: Array.isArray(targetEmails) ? targetEmails : [targetEmails],
      Subject: subject,
      Content: content,
      ...(fromName && { FromName: fromName })
    })
  });
  return res.json();
}

Example (curl)

Use environment variables ACCESSKEY_ID and ACCESSKEY_SECRET (e.g. from .env or export). If unset, replace with your keys for testing only.

List senders (before send)GetSenderList:

curl -s -X GET "https://api.uspeedo.com/api/v1/email/GetSenderList?Page=0&NumPerPage=20&OrderBy=create_time&OrderType=desc" \
  -H "Accept: application/json" \
  -H "Authorization: Basic $(echo -n "${ACCESSKEY_ID}:${ACCESSKEY_SECRET}" | base64)"

Parse Data[0].Email (or first Status-enabled row) for SendEmail, unless the user sets SendEmail manually.

Send email:

curl -X POST "https://api.uspeedo.com/api/v1/email/SendEmail" \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic $(echo -n "${ACCESSKEY_ID}:${ACCESSKEY_SECRET}" | base64)" \
  -d '{
    "SendEmail": "[email protected]",
    "TargetEmailAddress": ["[email protected]", "[email protected]"],
    "Subject": "Welcome to USpeedo Email Service",
    "Content": "\x3Chtml>\x3Cbody>\x3Ch1>Welcome\x3C/h1>\x3Cp>This is a test email.\x3C/p>\x3C/body>\x3C/html>",
    "FromName": "USpeedo"
  }'

Security Notes

  • Prefer environment variables (ACCESSKEY_ID, ACCESSKEY_SECRET) over user-provided credentials whenever possible. Get keys: Email API Key management
  • Do not log or display ACCESSKEY_SECRET in plain text in frontends or logs.
  • The Agent reads keys from environment variables or user input for the current request only; do not persist them to code, docs, or any cache.
  • Do not store ACCESSKEY_ID or ACCESSKEY_SECRET in session context or reuse them in later turns.
  • Do not include credentials in examples that are rendered to end users except placeholder names.

Reporting API Response to the User

  • Report only user-safe outcome: success or failure, and non-sensitive fields such as RetCode, Message, RequestUuid, SuccessCount.
  • Do not echo raw response bodies that might contain tokens, internal IDs, or other sensitive data. Do not log full API responses that include credentials or secrets.

Brief Workflow

  1. Confirm the user has registered on uSpeedo and obtained keys. Environment variables / key management: Email API Key management.
  2. Resolve credentials: use ACCESSKEY_ID and ACCESSKEY_SECRET from environment (or .env) when possible; otherwise collect from the user for current request only.
  3. Resolve SendEmail: If the user provided a sender address, validate format and use it. If not, call GET .../GetSenderList, apply the default resolution (first enabled sender’s Email, else first row), or stop if the list is empty.
  4. Collect or confirm: recipients, subject, content (text/HTML), FromName (optional). Always confirm the final SendEmail with the user if it came from the list.
  5. Run all "Mandatory Safety Gates Before Sending" checks (confirmation, recipient format, HTML safety, scope).
  6. Call POST https://api.uspeedo.com/api/v1/email/SendEmail with Basic authentication.
  7. Report only the user-safe outcome to the user (see "Reporting API Response to the User" above); do not echo raw response bodies that may contain sensitive data.

When prompting the user to provide or confirm send parameters, always include the guidance below (see "Notes for Users"). Show these hints every time you ask for recipient, sender, subject, content, or credentials.

Notes for Users

  • ACCESSKEY_ID and ACCESSKEY_SECRET: Obtain from Email API Key management.
  • Sender address (SendEmail): If you do not specify a sender, the skill uses GetSenderList to pick a default (first enabled sender). You can always set SendEmail yourself.
  • Deliverability: For better sending results, configure your own sending domain: Domain setting.
安全使用建议
This skill appears internally consistent. Before installing: 1) Verify your AI platform supports secret inputs or environment variables and will not store keys in logs or chat history. 2) Use short-lived or least-privilege uSpeedo API keys for testing and rotate them afterward. 3) Prefer setting ACCESSKEY_ID and ACCESSKEY_SECRET as environment variables (not pasting them into chat). 4) Confirm the agent always shows sender/recipients/subject/content for explicit approval before sending. 5) Avoid sending sensitive data and be cautious with HTML content — ensure the HTML safety rules are enforced by the platform/agent. If you cannot verify how the platform handles secrets or logs, treat the skill as higher risk and use one-time/test credentials only.
功能分析
Type: OpenClaw Skill Name: uspeedo-email-sending-channel Version: 1.1.2 The skill is a legitimate integration for sending transactional emails via the uSpeedo API. It includes robust safety instructions for the AI agent, such as mandatory user confirmation for all email parameters, HTML sanitization to prevent script injection, and strict rules against persisting or echoing API credentials (ACCESSKEY_ID/SECRET). All network activity is directed to the official uSpeedo API endpoints (api.uspeedo.com) as described in SKILL.md.
能力评估
Purpose & Capability
Name, description, and required environment variables (ACCESSKEY_ID, ACCESSKEY_SECRET) align with sending email via uSpeedo. No unrelated binaries, config paths, or extra credentials are requested.
Instruction Scope
SKILL.md confines itself to email-sending logic and includes explicit safety gates (confirmation, recipient validation, HTML sanitization, anti-phishing). It also instructs not to persist keys. Note: the non-persistence requirement depends on the agent/platform honoring these rules — the instructions cannot technically enforce platform log retention or telemetry behavior.
Install Mechanism
Instruction-only skill with no install spec or code files — low risk from install mechanisms (nothing is downloaded or written to disk by the skill itself).
Credentials
Only ACCESSKEY_ID and ACCESSKEY_SECRET are required; these are appropriate and expected for an API-based email sending channel. Primary credential designation (ACCESSKEY_SECRET) is coherent. No unrelated secrets are requested.
Persistence & Privilege
Skill is not always-enabled and is user-invocable; it does not request elevated or persistent platform privileges. However, because the skill needs live credentials, users should confirm their platform does not log or retain secrets (the SKILL.md warns about this). Autonomous invocation is allowed (platform default) — acceptable here but increases impact if platform stores inputs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install uspeedo-email-sending-channel
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /uspeedo-email-sending-channel 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.2
Version 1.1.2 Changelog: - No file changes detected for this release. - No functional or documentation updates; skill behavior remains identical to the previous version.
v1.1.1
uspeedo-email-sending-channel v1.1.1 - Added required_env_vars and primary_credential fields to SKILL.md. - Clarified API key guidance: removed reference to `.env.example` and updated environment variable instructions. - No code or logic changes; documentation/metadata improvements only.
v1.1.0
**Summary:** Adds automatic sender resolution via GetSenderList before sending email if SendEmail is not specified. - Now calls the uSpeedo GetSenderList API to select a sender (SendEmail) automatically if the user does not provide one. - Defaults to the first enabled sender; the user can override or specify sender explicitly. - Updated user confirmation flow to include sender resolution and confirmation. - No code or file-level changes detected; documentation is updated with new usage and safety instructions.
v1.0.8
- Removed documentation and registry files: README.md, SECURITY.md, reference.md, and registry.yaml. - Core email sending functionality and guidance in SKILL.md remain unchanged. - No changes to behavior, request/response structure, or credentials usage.
v1.0.7
- No code or documentation changes in this version. - Version bump to 1.0.7 without modifications to SKILL.md or other files.
v1.0.6
uspeedo-email-sending-channel v1.0.6 - Strengthened mandatory safety and consent requirements before any email is sent. - Introduced explicit "safety gates" for parameter confirmation, recipient validation, HTML content analysis, and use-case restrictions. - Now refuses to send without explicit user confirmation of sender, recipients, subject, and final content in the same turn. - Added clear rules to block sending potentially risky or deceptive emails. - Clarified that credentials must never be echoed or stored, and incomplete setup fails securely.
v1.0.5
uspeedo-email-sending-channel v1.0.5 - Added sample files: `.env.example`, `.gitignore`, and `LICENSE` to the repository. - No user-facing functionality changes; documentation and examples remain the same. - Improves onboarding by providing environment variable setup template and license information.
v1.0.4
- Changed all uSpeedo attribution and referral links to use `ChannelCode=OpenClaw` instead of `SaleCode=UI2346`. - Updated email API key management URLs to use the new `ChannelCode` parameter. - No functional or API changes; documentation and metadata only.
v1.0.3
**Environment variable support and documentation update.** - Added explicit preference for environment variables (`ACCESSKEY_ID`, `ACCESSKEY_SECRET`) over user-supplied credentials; environment variables now take precedence where both are present. - Updated documentation to guide users to obtain API keys and set them as environment variables, referencing a sample `.env` file. - Clarified credential handling: credentials should not be cached or persisted, and `.env` files must not be committed to version control. - Provided updated example code (Node.js and curl) showing use of environment variables for authentication. - Improved instructions for users and integrations on where and how to acquire necessary credentials and how to use them securely.
v1.0.2
uspeedo-email-sending-channel 1.0.2 - Added README.md with usage instructions and examples. - Added SECURITY.md detailing security practices for credential handling. - Added registry.yaml for skill registration and integration. - No changes to core logic or usage guidelines.
v1.0.1
- Added explicit metadata for required credentials (ACCESSKEY_ID, ACCESSKEY_SECRET) and credential handling note. - Clarified key handling: new "Before You Use" and "Required Credentials" sections emphasize platform-side credential management and non-persistence requirements. - Updated documentation to stress that keys may be provided per request or via environment variables, and must never be persisted. - Added stricter guidance for API response reporting: only share user-safe fields, never echo raw API responses or sensitive data. - Minor reorganization and expanded guidance for platform integrators and users about credential security best practices.
v1.0.0
Initial release: Enables sending emails via uSpeedo's platform API. - Allows users to send email by providing message content, sender and recipient details, and uSpeedo API credentials. - Requires users to register on uSpeedo and obtain ACCESSKEY_ID and ACCESSKEY_SECRET. - Enforces strict security: sensitive credentials must never be stored, cached, or logged. - Provides clear usage instructions, prerequisites, and code examples (curl and JavaScript). - Only uses uSpeedo's sending channel, not the user's own mailbox or SMTP.
元数据
Slug uspeedo-email-sending-channel
版本 1.1.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 12
常见问题

uspeedo-email-sending-channel 是什么?

Sends user-authorized transactional email via uSpeedo API with ACCESSKEY credentials (env preferred). Before SendEmail, calls GetSenderList to resolve SendEm... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 369 次。

如何安装 uspeedo-email-sending-channel?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install uspeedo-email-sending-channel」即可一键安装,无需额外配置。

uspeedo-email-sending-channel 是免费的吗?

是的,uspeedo-email-sending-channel 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

uspeedo-email-sending-channel 支持哪些平台?

uspeedo-email-sending-channel 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 uspeedo-email-sending-channel?

由 code-by-ai(@code-by-ai)开发并维护,当前版本 v1.1.2。

💬 留言讨论