{"id":"8556dfbf-a93c-4560-a5c1-e43cdada4664","entityType":"agent","slug":"clawhub-sendmux-ai-sendmux-send-email","name":"sendmux-send-email","canonicalUrl":"https://www.xpersona.co/agent/clawhub-sendmux-ai-sendmux-send-email","canonicalPath":"/agent/clawhub-sendmux-ai-sendmux-send-email","generatedAt":"2026-10-10T10:44:07.780Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:14:46.961Z","emptyReason":null},"description":"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s175c163jct9mhsx0mrfbz64j989s00r:sendmux-send-email","sourceUrl":"https://clawhub.ai/sendmux.ai/sendmux-send-email","homepage":"https://clawhub.ai/sendmux.ai/skills/sendmux-send-email","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/sendmux.ai/sendmux-send-email","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/sendmux.ai/skills/sendmux-send-email","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"sendmux-send-email technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:14:46.961Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:14:46.961Z","emptyReason":null},"stars":null,"forks":null,"downloads":1626,"packageName":null,"latestVersion":"1.0.11","tractionLabel":"1.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:14:46.961Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T06:14:46.961Z","lastCrawledAt":"2026-10-10T06:14:46.961Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T06:14:46.961Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.11","createdAt":"2026-10-02T04:23:21.981Z","changelog":"sendmux-send-email 1.0.11 - Version bump in SKILL.md from 1.7.0 to 1.7.1. - Removed the file: skill-card.md. - No functional or instructional changes to the skill's guidance or usage documented in SKILL.md.","fileCount":3,"zipByteSize":6016},{"version":"1.0.10","createdAt":"2026-09-30T12:03:00.842Z","changelog":"Version 1.7.0 - Updated documentation in SKILL.md for improved clarity and guidance. - Removed the skill-card.md file. - Minor adjustments and corrections to recommended best practices and usage notes. - No underlying functional or interface changes.","fileCount":3,"zipByteSize":6109},{"version":"1.0.9","createdAt":"2026-09-18T05:52:27.523Z","changelog":"sendmux-send-email 1.6.0 is a documentation-focused update with improvements to attachment upload guidance, batch sending details, and lifecycle explanations. - Expanded mailbox/agent profile lifecycle and sending approval process documentation. - Clarified attachment handling, distinguishing between presigned upload, inline, and agent-authored bytes. - Updated batch send instructions, specifying recipient limits and batch response validation. - Improved credential, idempotency, and OAuth handling explanations. - Dropped legacy file 'skill-card.md' from the repository.","fileCount":3,"zipByteSize":6292},{"version":"1.0.8","createdAt":"2026-09-11T04:00:23.727Z","changelog":"Version 1.0.8 - Updated documentation in SKILL.md: expanded credential and authentication guidance, including details on OAuth and REST/OAuth grant usage. - Added explicit instructions for validating Sending connections and profile management via CLI. - Improved SDK client documentation, clarifying support for accessToken and token providers. - Removed skill-card.md file.","fileCount":3,"zipByteSize":5350},{"version":"1.0.7","createdAt":"2026-09-01T10:37:42.785Z","changelog":"Version 1.0.7 - Updated documentation for improved clarity in the \"Safety first\" section regarding mailbox/inbox storage after sending is revoked. - Version bumped from 1.4.1 to 1.4.2 in the SKILL.md. - No code or functional changes; change is limited to SKILL.md file.","fileCount":3,"zipByteSize":5136},{"version":"1.0.6","createdAt":"2026-09-01T10:28:44.673Z","changelog":"sendmux-send-email 1.0.6 - Documentation updated in SKILL.md: increased clarity on inbox quota after sending approval (now says \"at least 5 GiB\"). - The version in SKILL.md was incremented from 1.4.0 to 1.4.1. - skill-card.md file was removed.","fileCount":3,"zipByteSize":5128},{"version":"1.0.5","createdAt":"2026-09-01T06:05:59.278Z","changelog":"- Updated to version 1.4.0. - Expanded safety and credential guidance: clarified that durable agent profiles are read-only and require owner approval for sending, and documented delegated sending token behavior. - Added details on inbox capacity limits before and after sending approval. - Enhanced CLI instructions: recommend using self-registered agent profiles instead of copying credentials, with explanation of process and requirements. - Removed legacy skill-card.md file.","fileCount":3,"zipByteSize":5150},{"version":"1.0.4","createdAt":"2026-07-09T03:58:47.642Z","changelog":"- Version updated from 1.2.0 to 1.3.0 in SKILL.md. - No changes to skill logic or behavior; documentation version information updated only.","fileCount":3,"zipByteSize":5078}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s175c163jct9mhsx0mrfbz64j989s00r:sendmux-send-email","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s175c163jct9mhsx0mrfbz64j989s00r:sendmux-send-email` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/sendmux.ai/sendmux-send-email before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T10:44:07.778Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-sendmux-ai-sendmux-send-email/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:14:46.961Z","emptyReason":null},"readme":"Skill: sendmux-send-email\n\nOwner: sendmux.ai\n\nSummary: Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nTags: latest:1.0.11\n\nVersion history:\n\nv1.0.11 | 2026-10-02T04:23:21.981Z | auto\n\nsendmux-send-email 1.0.11\n\n- Version bump in SKILL.md from 1.7.0 to 1.7.1.\n- Removed the file: skill-card.md.\n- No functional or instructional changes to the skill's guidance or usage documented in SKILL.md.\n\nv1.0.10 | 2026-09-30T12:03:00.842Z | auto\n\nVersion 1.7.0\n\n- Updated documentation in SKILL.md for improved clarity and guidance.\n- Removed the skill-card.md file.\n- Minor adjustments and corrections to recommended best practices and usage notes.\n- No underlying functional or interface changes.\n\nv1.0.9 | 2026-09-18T05:52:27.523Z | auto\n\nsendmux-send-email 1.6.0 is a documentation-focused update with improvements to attachment upload guidance, batch sending details, and lifecycle explanations.\n\n- Expanded mailbox/agent profile lifecycle and sending approval process documentation.\n- Clarified attachment handling, distinguishing between presigned upload, inline, and agent-authored bytes.\n- Updated batch send instructions, specifying recipient limits and batch response validation.\n- Improved credential, idempotency, and OAuth handling explanations.\n- Dropped legacy file 'skill-card.md' from the repository.\n\nv1.0.8 | 2026-09-11T04:00:23.727Z | auto\n\nVersion 1.0.8\n\n- Updated documentation in SKILL.md: expanded credential and authentication guidance, including details on OAuth and REST/OAuth grant usage.\n- Added explicit instructions for validating Sending connections and profile management via CLI.\n- Improved SDK client documentation, clarifying support for accessToken and token providers.\n- Removed skill-card.md file.\n\nv1.0.7 | 2026-09-01T10:37:42.785Z | auto\n\nVersion 1.0.7\n\n- Updated documentation for improved clarity in the \"Safety first\" section regarding mailbox/inbox storage after sending is revoked.\n- Version bumped from 1.4.1 to 1.4.2 in the SKILL.md.\n- No code or functional changes; change is limited to SKILL.md file.\n\nv1.0.6 | 2026-09-01T10:28:44.673Z | auto\n\nsendmux-send-email 1.0.6\n\n- Documentation updated in SKILL.md: increased clarity on inbox quota after sending approval (now says \"at least 5 GiB\").\n- The version in SKILL.md was incremented from 1.4.0 to 1.4.1.\n- skill-card.md file was removed.\n\nv1.0.5 | 2026-09-01T06:05:59.278Z | auto\n\n- Updated to version 1.4.0.\n- Expanded safety and credential guidance: clarified that durable agent profiles are read-only and require owner approval for sending, and documented delegated sending token behavior.\n- Added details on inbox capacity limits before and after sending approval.\n- Enhanced CLI instructions: recommend using self-registered agent profiles instead of copying credentials, with explanation of process and requirements.\n- Removed legacy skill-card.md file.\n\nv1.0.4 | 2026-07-09T03:58:47.642Z | auto\n\n- Version updated from 1.2.0 to 1.3.0 in SKILL.md.\n- No changes to skill logic or behavior; documentation version information updated only.\n\nv1.0.3 | 2026-07-09T01:46:32.367Z | auto\n\nsendmux-send-email 1.2.0\n\n- Updated version number from 1.1.0 to 1.2.0 in SKILL.md.\n- No changes to code; documentation update only.\n\nv1.0.2 | 2026-07-08T04:08:10.652Z | auto\n\n- Updated instructions and examples to prefer uploading attachments first and using `attachment_id` references for sends.\n- Added guidance and examples for local file uploads (`sending_upload_attachment`, `sending_create_attachment_upload`) before sending.\n- Clarified mailbox `blob_id` is not for Sending API; explained attachment size limits for both upload and send.\n- Expanded the \"Choose the send path\" table with a row for Sending API attachment files.\n- Improved attachment-handling best practices for CLI, SDK, and MCP scenarios.\n\nv1.0.1 | 2026-07-06T01:37:07.943Z | auto\n\nVersion 1.1.0\n\n- Updated documentation in SKILL.md for improved clarity and additional usage guidance.\n- No changes to runtime code or functionality; documentation only.\n- Version bump reflects substantially enhanced instructions, best practices, and scenarios.\n\nv1.0.0 | 2026-07-03T09:06:30.862Z | auto\n\nInitial release of sendmux-send-email skill.\n\n- Allows sending one or multiple emails through Sendmux using mailbox or agent credentials.\n- Supports different send methods: HTTP API, MCP, CLI, and SDK.\n- Includes safety checks for user confirmation of all recipients and message content before sending.\n- Provides idempotency support to prevent duplicate sends.\n- Accepts attachments and batch sends (up to 100 messages per batch).\n- Includes detailed usage examples, required JSON structure, and error handling guidance.\n\nArchive index:\n\nArchive v1.0.11: 3 files, 6016 bytes\n\nFiles: skill-card.md (1830b), SKILL.md (12707b), _meta.json (138b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.7.1\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key, owner-approved Sending-resource `smx_agent_` token, or REST OAuth grant with Sending access and `email.send` for the Sending HTTP API. SMTP requires a send-capable API key; OAuth access tokens are not SMTP or IMAP passwords.\n\nFor an agent-profile before/after approval answer, cover the complete lifecycle:\n\n| State | Required explanation |\n| --- | --- |\n| Before owner acceptance and sending approval | The durable credential is read/receive-only, sends fail closed, and the self-registered inbox is capped at 500 MiB. |\n| After sending approval | Storage rises to at least 5 GiB. The CLI automatically exchanges for a one-hour delegated `email.send` token and caches it only until near expiry; the sender supplies one stable `--idempotency-key` per logical send. |\n| After sending revocation | Sending becomes unavailable again, but revocation does not itself change the current inbox storage allocation. |\n\nSending approval supplies the required authority; it does not guarantee that a later request will pass validation or be accepted for delivery.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload a real file with `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; reserve `sending_upload_attachment` inline content for tiny agent-authored bytes; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nWhen explaining a batch send, cover:\n\n| Part | Requirement |\n| --- | --- |\n| Authority | A send-capable `smx_mbx_` key, owner-approved Sending-resource `smx_agent_` token, or REST OAuth grant with `email.send`. |\n| Payload | A `messages[]` body with up to 100 independently confirmed messages. |\n| Completion | Inspect every result item because a batch can partially succeed. |\n\nCredential validation proves only that the credential can read Sending connection metadata; it does not approve or authorise a later message. A complete validation answer has three parts:\n\n- **Validation:** `sendmux sending:get-connection --profile work --json` checks a Sending connection without sending email.\n- **Transport:** a REST OAuth grant with `email.send` works for the HTTP Sending API; OAuth access tokens are not SMTP or IMAP passwords.\n- **Next send:** separately require explicit user approval of the complete sender, recipients, subject, body, and attachments before any later send.\n\nFor OAuth profile setup, refresh and logout, follow `sendmux-cli`. SDK clients accept `accessToken` instead of `apiKey`, including a token provider; your application owns storage and refresh coordination.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 49 each and subject to 50 total `to`, `cc`, and `bcc` recipients.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. For a presigned Sending upload, the upload intent's returned `max_size_bytes` is the size authority; the final sent message is capped at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nFor a direct HTTP batch call, keep authority and retry metadata outside the JSON body:\n\n```http\nPOST /emails/send/batch HTTP/1.1\nAuthorization: Bearer $SENDMUX_MBX_KEY\nContent-Type: application/json\nIdempotency-Key: $IDEMPOTENCY_KEY\n```\n\n`$SENDMUX_MBX_KEY` must resolve to a send-capable `smx_mbx_` key. An owner-approved Sending-resource `smx_agent_` token is also accepted. The request body is:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Tiny agent-authored content: `sending_upload_attachment` with `content_base64` only when the decoded content is at most 32,768 bytes.\n- Real local file upload before send: complete every step below.\n  1. Call `sending_create_attachment_upload` with the filename, content type, and exact local `size_bytes`; compare the size with returned `max_size_bytes`.\n  2. Transfer bytes outside model context using the exact returned method, URL, and headers with no Sendmux API key. Keep the signed URL and returned headers out of process arguments and retained output.\n  3. Take `attachment_id` from the successful external upload response. The intent returns `upload_id` and transfer metadata, not `attachment_id`; never substitute its `upload_id` or a Mailbox `blob_id`.\n  4. Pass that `attachment_id` to `sending_send_email` with one stable `Idempotency-Key` for this logical send when the client exposes it. If MCP does not expose it clearly, use CLI, SDK, or direct HTTP for a retry-sensitive send.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nFor attachments through MCP, use `sendmux-attachments` so the agent chooses presigned upload or tiny inline base64 correctly; MCP does not receive a local `file_path`.\n\n## CLI\n\nFor a self-registered agent, use its profile instead of copying credentials:\n\n```bash\nsendmux sending:send \\\n  --profile my-agent \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-email.json \\\n  --json\n```\n\nThe owner must already have accepted the invitation and approved sending. The CLI obtains and caches the short-lived delegated token; the durable read credential is not used directly by the Sending API.\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  throwOnError: true,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.data.message_id, response.data.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  throwOnError: true,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl --silent --show-error --fail-with-body \\\n  --config - \\\n  --data-binary @sendmux-email.json <<CURL_CONFIG\nrequest = \"POST\"\nurl = \"https://smtp.sendmux.ai/api/v1/emails/send\"\nheader = \"Authorization: Bearer $SENDMUX_MBX_KEY\"\nheader = \"Content-Type: application/json\"\nheader = \"Idempotency-Key: $IDEMPOTENCY_KEY\"\nCURL_CONFIG\n```\n\nThe stdin-fed config keeps the bearer and idempotency value out of the child process arguments. Do not print or persist that config.\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790915001981\n}\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nOpenClaw users and developers use this skill to prepare or send individual and batch emails through Sendmux, including messages with attachments, after confirming the full message details.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Outbound messages could reach an unintended recipient or disclose sensitive content or attachments.\n\nMitigation: Review and confirm the sender, every recipient, subject, body, and attachment before each send or batch.\n\nRisk: Sendmux credentials could be exposed or grant broader sending access than needed.\n\nMitigation: Use scoped credentials and keep secrets out of chat.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email)\n- [Sendmux skills homepage (declared in skill metadata)](https://github.com/Sendmux/skills)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Code]\n\n**Output Format:** [Markdown with JSON, shell, HTTP, and TypeScript examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Sending requires confirmed message details and appropriate Sendmux authorization.]\n\n## Skill Version(s):\n\n1.0.11 (source: ClawHub release metadata; skill frontmatter: 1.7.1)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.10: 3 files, 6109 bytes\n\nFiles: skill-card.md (2111b), SKILL.md (12707b), _meta.json (138b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.7.0\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key, owner-approved Sending-resource `smx_agent_` token, or REST OAuth grant with Sending access and `email.send` for the Sending HTTP API. SMTP requires a send-capable API key; OAuth access tokens are not SMTP or IMAP passwords.\n\nFor an agent-profile before/after approval answer, cover the complete lifecycle:\n\n| State | Required explanation |\n| --- | --- |\n| Before owner acceptance and sending approval | The durable credential is read/receive-only, sends fail closed, and the self-registered inbox is capped at 500 MiB. |\n| After sending approval | Storage rises to at least 5 GiB. The CLI automatically exchanges for a one-hour delegated `email.send` token and caches it only until near expiry; the sender supplies one stable `--idempotency-key` per logical send. |\n| After sending revocation | Sending becomes unavailable again, but revocation does not itself change the current inbox storage allocation. |\n\nSending approval supplies the required authority; it does not guarantee that a later request will pass validation or be accepted for delivery.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload a real file with `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; reserve `sending_upload_attachment` inline content for tiny agent-authored bytes; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nWhen explaining a batch send, cover:\n\n| Part | Requirement |\n| --- | --- |\n| Authority | A send-capable `smx_mbx_` key, owner-approved Sending-resource `smx_agent_` token, or REST OAuth grant with `email.send`. |\n| Payload | A `messages[]` body with up to 100 independently confirmed messages. |\n| Completion | Inspect every result item because a batch can partially succeed. |\n\nCredential validation proves only that the credential can read Sending connection metadata; it does not approve or authorise a later message. A complete validation answer has three parts:\n\n- **Validation:** `sendmux sending:get-connection --profile work --json` checks a Sending connection without sending email.\n- **Transport:** a REST OAuth grant with `email.send` works for the HTTP Sending API; OAuth access tokens are not SMTP or IMAP passwords.\n- **Next send:** separately require explicit user approval of the complete sender, recipients, subject, body, and attachments before any later send.\n\nFor OAuth profile setup, refresh and logout, follow `sendmux-cli`. SDK clients accept `accessToken` instead of `apiKey`, including a token provider; your application owns storage and refresh coordination.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 49 each and subject to 50 total `to`, `cc`, and `bcc` recipients.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. For a presigned Sending upload, the upload intent's returned `max_size_bytes` is the size authority; the final sent message is capped at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nFor a direct HTTP batch call, keep authority and retry metadata outside the JSON body:\n\n```http\nPOST /emails/send/batch HTTP/1.1\nAuthorization: Bearer $SENDMUX_MBX_KEY\nContent-Type: application/json\nIdempotency-Key: $IDEMPOTENCY_KEY\n```\n\n`$SENDMUX_MBX_KEY` must resolve to a send-capable `smx_mbx_` key. An owner-approved Sending-resource `smx_agent_` token is also accepted. The request body is:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Tiny agent-authored content: `sending_upload_attachment` with `content_base64` only when the decoded content is at most 32,768 bytes.\n- Real local file upload before send: complete every step below.\n  1. Call `sending_create_attachment_upload` with the filename, content type, and exact local `size_bytes`; compare the size with returned `max_size_bytes`.\n  2. Transfer bytes outside model context using the exact returned method, URL, and headers with no Sendmux API key. Keep the signed URL and returned headers out of process arguments and retained output.\n  3. Take `attachment_id` from the successful external upload response. The intent returns `upload_id` and transfer metadata, not `attachment_id`; never substitute its `upload_id` or a Mailbox `blob_id`.\n  4. Pass that `attachment_id` to `sending_send_email` with one stable `Idempotency-Key` for this logical send when the client exposes it. If MCP does not expose it clearly, use CLI, SDK, or direct HTTP for a retry-sensitive send.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nFor attachments through MCP, use `sendmux-attachments` so the agent chooses presigned upload or tiny inline base64 correctly; MCP does not receive a local `file_path`.\n\n## CLI\n\nFor a self-registered agent, use its profile instead of copying credentials:\n\n```bash\nsendmux sending:send \\\n  --profile my-agent \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-email.json \\\n  --json\n```\n\nThe owner must already have accepted the invitation and approved sending. The CLI obtains and caches the short-lived delegated token; the durable read credential is not used directly by the Sending API.\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  throwOnError: true,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.data.message_id, response.data.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  throwOnError: true,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl --silent --show-error --fail-with-body \\\n  --config - \\\n  --data-binary @sendmux-email.json <<CURL_CONFIG\nrequest = \"POST\"\nurl = \"https://smtp.sendmux.ai/api/v1/emails/send\"\nheader = \"Authorization: Bearer $SENDMUX_MBX_KEY\"\nheader = \"Content-Type: application/json\"\nheader = \"Idempotency-Key: $IDEMPOTENCY_KEY\"\nCURL_CONFIG\n```\n\nThe stdin-fed config keeps the bearer and idempotency value out of the child process arguments. Do not print or persist that config.\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1790769780842\n}\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nAgents and developers use this skill to prepare and send approved single or batch emails through Sendmux, including attachments and integration examples.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: An agent could send email to an unintended recipient or include unapproved content or attachments.\n\nMitigation: Confirm the sender, every recipient, subject, body, and attachments before each send, including the complete batch.\n\nRisk: Sendmux credentials or sensitive email content could be exposed or used without suitable authority.\n\nMitigation: Keep credentials in approved environment or profile storage, use send-authorized access, and check the destination and account authority before sending sensitive content.\n\nRisk: Retries or partial batch success could result in duplicate or overlooked sends.\n\nMitigation: Use a stable idempotency key for each logical send and inspect every batch result before retrying.\n\n## Reference(s):\n\n- [Sendmux Send Email on ClawHub](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email)\n- [Sendmux skills homepage](https://github.com/Sendmux/skills)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Code, Shell commands, Configuration]\n\n**Output Format:** [Markdown with JSON, shell, and TypeScript examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Sending requires explicit approval of message details and appropriate Sendmux credentials.]\n\n## Skill Version(s):\n\n1.0.10 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.9: 3 files, 6292 bytes\n\nFiles: skill-card.md (2506b), SKILL.md (12707b), _meta.json (137b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.6.0\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key, owner-approved Sending-resource `smx_agent_` token, or REST OAuth grant with Sending access and `email.send` for the Sending HTTP API. SMTP requires a send-capable API key; OAuth access tokens are not SMTP or IMAP passwords.\n\nFor an agent-profile before/after approval answer, cover the complete lifecycle:\n\n| State | Required explanation |\n| --- | --- |\n| Before owner acceptance and sending approval | The durable credential is read/receive-only, sends fail closed, and the self-registered inbox is capped at 500 MiB. |\n| After sending approval | Storage rises to at least 5 GiB. The CLI automatically exchanges for a one-hour delegated `email.send` token and caches it only until near expiry; the sender supplies one stable `--idempotency-key` per logical send. |\n| After sending revocation | Sending becomes unavailable again, but revocation does not itself change the current inbox storage allocation. |\n\nSending approval supplies the required authority; it does not guarantee that a later request will pass validation or be accepted for delivery.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload a real file with `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; reserve `sending_upload_attachment` inline content for tiny agent-authored bytes; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nWhen explaining a batch send, cover:\n\n| Part | Requirement |\n| --- | --- |\n| Authority | A send-capable `smx_mbx_` key, owner-approved Sending-resource `smx_agent_` token, or REST OAuth grant with `email.send`. |\n| Payload | A `messages[]` body with up to 100 independently confirmed messages. |\n| Completion | Inspect every result item because a batch can partially succeed. |\n\nCredential validation proves only that the credential can read Sending connection metadata; it does not approve or authorise a later message. A complete validation answer has three parts:\n\n- **Validation:** `sendmux sending:get-connection --profile work --json` checks a Sending connection without sending email.\n- **Transport:** a REST OAuth grant with `email.send` works for the HTTP Sending API; OAuth access tokens are not SMTP or IMAP passwords.\n- **Next send:** separately require explicit user approval of the complete sender, recipients, subject, body, and attachments before any later send.\n\nFor OAuth profile setup, refresh and logout, follow `sendmux-cli`. SDK clients accept `accessToken` instead of `apiKey`, including a token provider; your application owns storage and refresh coordination.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 49 each and subject to 50 total `to`, `cc`, and `bcc` recipients.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. For a presigned Sending upload, the upload intent's returned `max_size_bytes` is the size authority; the final sent message is capped at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nFor a direct HTTP batch call, keep authority and retry metadata outside the JSON body:\n\n```http\nPOST /emails/send/batch HTTP/1.1\nAuthorization: Bearer $SENDMUX_MBX_KEY\nContent-Type: application/json\nIdempotency-Key: $IDEMPOTENCY_KEY\n```\n\n`$SENDMUX_MBX_KEY` must resolve to a send-capable `smx_mbx_` key. An owner-approved Sending-resource `smx_agent_` token is also accepted. The request body is:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Tiny agent-authored content: `sending_upload_attachment` with `content_base64` only when the decoded content is at most 32,768 bytes.\n- Real local file upload before send: complete every step below.\n  1. Call `sending_create_attachment_upload` with the filename, content type, and exact local `size_bytes`; compare the size with returned `max_size_bytes`.\n  2. Transfer bytes outside model context using the exact returned method, URL, and headers with no Sendmux API key. Keep the signed URL and returned headers out of process arguments and retained output.\n  3. Take `attachment_id` from the successful external upload response. The intent returns `upload_id` and transfer metadata, not `attachment_id`; never substitute its `upload_id` or a Mailbox `blob_id`.\n  4. Pass that `attachment_id` to `sending_send_email` with one stable `Idempotency-Key` for this logical send when the client exposes it. If MCP does not expose it clearly, use CLI, SDK, or direct HTTP for a retry-sensitive send.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nFor attachments through MCP, use `sendmux-attachments` so the agent chooses presigned upload or tiny inline base64 correctly; MCP does not receive a local `file_path`.\n\n## CLI\n\nFor a self-registered agent, use its profile instead of copying credentials:\n\n```bash\nsendmux sending:send \\\n  --profile my-agent \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-email.json \\\n  --json\n```\n\nThe owner must already have accepted the invitation and approved sending. The CLI obtains and caches the short-lived delegated token; the durable read credential is not used directly by the Sending API.\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  throwOnError: true,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.data.message_id, response.data.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  throwOnError: true,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl --silent --show-error --fail-with-body \\\n  --config - \\\n  --data-binary @sendmux-email.json <<CURL_CONFIG\nrequest = \"POST\"\nurl = \"https://smtp.sendmux.ai/api/v1/emails/send\"\nheader = \"Authorization: Bearer $SENDMUX_MBX_KEY\"\nheader = \"Content-Type: application/json\"\nheader = \"Idempotency-Key: $IDEMPOTENCY_KEY\"\nCURL_CONFIG\n```\n\nThe stdin-fed config keeps the bearer and idempotency value out of the child process arguments. Do not print or persist that config.\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1789710747523\n}\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers and agents use this skill to prepare Sendmux email sending workflows, including single sends, batch sends, attachments, idempotency, and CLI, SDK, HTTP, or MCP examples. It is intended for situations where the user is ready to send outbound email through Sendmux or needs commands and code for doing so safely.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: An agent could send email before the user has confirmed recipients, subject, body, sender, and attachments.\n\nMitigation: Require explicit user confirmation of the complete message or batch before any Sendmux send tool, API call, CLI command, or SDK call is used.\n\nRisk: Sendmux credentials could be exposed if users paste keys into chat or commands print retained secrets.\n\nMitigation: Keep Sendmux keys in approved environment or profile storage, avoid asking users to paste secrets, and keep bearer tokens and signed upload URLs out of retained command output.\n\nRisk: Attachments may upload local data outside the workspace or be sent with the wrong attachment reference.\n\nMitigation: Use the documented attachment upload flow, compare file size to the returned limit, avoid model-generated base64 for real files, and send only the returned attachment_id.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email)\n- [Sendmux skills homepage](https://github.com/Sendmux/skills)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with JSON, shell, TypeScript, HTTP, and CLI examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include Sendmux request bodies, idempotency-key guidance, credential setup guidance, batch-send checks, and attachment-handling instructions.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.8: 3 files, 5350 bytes\n\nFiles: skill-card.md (2248b), SKILL.md (10162b), _meta.json (137b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.5.0\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key, owner-approved Sending-resource `smx_agent_` token, or REST OAuth grant with Sending access and `email.send` for the Sending HTTP API. SMTP requires a send-capable API key; OAuth access tokens are not SMTP or IMAP passwords.\n- A durable agent profile is read/receive-only. Do not treat its stored credential as send-capable.\n- Before owner acceptance and sending approval, agent-profile sends fail closed. After approval, the CLI exchanges and caches a one-hour delegated `email.send` token automatically.\n- The self-registered inbox is capped at 500 MiB before approval. Sending approval raises it to at least 5 GiB first. Revoking sending does not itself change the current inbox storage allocation.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload first with `sending_upload_attachment`, `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nBatch sends accept up to 100 messages. A batch response can partially succeed, so inspect every result item.\n\nValidate a Sending connection without sending email with `sendmux sending:get-connection --profile work --json`. For OAuth profile setup, refresh and logout, follow `sendmux-cli`. SDK clients accept `accessToken` instead of `apiKey`, including a token provider; your application owns storage and refresh coordination.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 100 each.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, `sending_upload_attachment`, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. Sending uploads cap each file at 18 MiB and the final sent message at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nBatch send body:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Local file upload before send: `sending_upload_attachment` with `file_path`.\n- Hosted or shell-capable upload before send: `sending_create_attachment_upload`, then `PUT` bytes to the returned URL with the returned headers and no Sendmux API key.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nInclude an idempotency key when the client exposes the header parameter. If the MCP client does not expose headers clearly, use CLI, SDK, or direct HTTP for retry-sensitive sends. For attachments through MCP, use `sendmux-attachments` so the agent chooses `file_path`, presigned upload, or tiny inline base64 correctly.\n\n## CLI\n\nFor a self-registered agent, use its profile instead of copying credentials:\n\n```bash\nsendmux sending:send \\\n  --profile my-agent \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-email.json \\\n  --json\n```\n\nThe owner must already have accepted the invitation and approved sending. The CLI obtains and caches the short-lived delegated token; the durable read credential is not used directly by the Sending API.\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.message_id, response.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl -X POST https://smtp.sendmux.ai/api/v1/emails/send \\\n  -H \"Authorization: Bearer $SENDMUX_MBX_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: $IDEMPOTENCY_KEY\" \\\n  -d @sendmux-email.json\n```\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1789099223727\n}\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers and agents use this skill to prepare or execute Sendmux outbound email workflows through MCP, CLI, SDKs, or direct HTTP. It supports single and batch sends, attachment handling, idempotency, and credential-safe send-path selection.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Agents may send email to external recipients with unintended recipients, content, or attachments.\n\nMitigation: Require user confirmation of every recipient, message body, and attachment before sending.\n\nRisk: Credentials with broad or incorrect send permissions could expose mail-sending capability beyond the intended workflow.\n\nMitigation: Use scoped send-capable credentials or delegated tokens and avoid asking users to paste secrets into chat.\n\nRisk: Retries can duplicate outbound email or conflict with a changed message body.\n\nMitigation: Use one stable idempotency key per logical email or batch and handle idempotency conflicts deliberately.\n\n## Reference(s):\n\n- [Sendmux skills repository](https://github.com/Sendmux/skills)\n- [Sendmux Sending API endpoint](https://smtp.sendmux.ai/api/v1/emails/send)\n- [ClawHub skill page](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, markdown, code, shell commands, configuration]\n\n**Output Format:** [Markdown with JSON, TypeScript, and bash examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include Sendmux API request bodies, MCP tool choices, CLI commands, SDK snippets, and retry/error-handling guidance.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.7: 3 files, 5136 bytes\n\nFiles: skill-card.md (2235b), SKILL.md (9692b), _meta.json (137b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.4.2\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key or owner-approved Sending-resource `smx_agent_` token for the Sending API.\n- A durable agent profile is read/receive-only. Do not treat its stored credential as send-capable.\n- Before owner acceptance and sending approval, agent-profile sends fail closed. After approval, the CLI exchanges and caches a one-hour delegated `email.send` token automatically.\n- The self-registered inbox is capped at 500 MiB before approval. Sending approval raises it to at least 5 GiB first. Revoking sending does not itself change the current inbox storage allocation.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload first with `sending_upload_attachment`, `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nBatch sends accept up to 100 messages. A batch response can partially succeed, so inspect every result item.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 100 each.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, `sending_upload_attachment`, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. Sending uploads cap each file at 18 MiB and the final sent message at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nBatch send body:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Local file upload before send: `sending_upload_attachment` with `file_path`.\n- Hosted or shell-capable upload before send: `sending_create_attachment_upload`, then `PUT` bytes to the returned URL with the returned headers and no Sendmux API key.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nInclude an idempotency key when the client exposes the header parameter. If the MCP client does not expose headers clearly, use CLI, SDK, or direct HTTP for retry-sensitive sends. For attachments through MCP, use `sendmux-attachments` so the agent chooses `file_path`, presigned upload, or tiny inline base64 correctly.\n\n## CLI\n\nFor a self-registered agent, use its profile instead of copying credentials:\n\n```bash\nsendmux sending:send \\\n  --profile my-agent \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-email.json \\\n  --json\n```\n\nThe owner must already have accepted the invitation and approved sending. The CLI obtains and caches the short-lived delegated token; the durable read credential is not used directly by the Sending API.\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.message_id, response.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl -X POST https://smtp.sendmux.ai/api/v1/emails/send \\\n  -H \"Authorization: Bearer $SENDMUX_MBX_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: $IDEMPOTENCY_KEY\" \\\n  -d @sendmux-email.json\n```\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1788259062785\n}\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and external agent users use this skill when an agent needs to prepare Sendmux email-sending commands, API calls, SDK code, or MCP tool usage with confirmed recipients, message content, credentials, idempotency, and attachments.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: An agent could send email to unconfirmed recipients or with unapproved message content.\n\nMitigation: Require review of every recipient, sender, subject, body, batch list, and attachment before allowing a send.\n\nRisk: Sendmux credentials could be exposed if a user pastes secrets into chat.\n\nMitigation: Use scoped or revocable Sendmux credentials and do not ask users to paste API keys into chat.\n\nRisk: Repeated attempts could duplicate sends or trigger idempotency conflicts.\n\nMitigation: Use one stable Idempotency-Key per logical email or batch and handle idempotency conflicts deliberately.\n\n## Reference(s):\n\n- [Sendmux skills homepage](https://github.com/Sendmux/skills)\n- [Sendmux Sending API endpoint](https://smtp.sendmux.ai/api/v1/emails/send)\n- [ClawHub skill page](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Markdown, Code, Shell commands, Configuration]\n\n**Output Format:** [Markdown with JSON, TypeScript, and bash examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include Sendmux API request bodies, CLI commands, SDK snippets, MCP tool choices, idempotency guidance, and attachment-handling guidance.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata); SKILL.md frontmatter reports 1.4.2\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.6: 3 files, 5128 bytes\n\nFiles: skill-card.md (2310b), SKILL.md (9667b), _meta.json (137b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.4.1\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key or owner-approved Sending-resource `smx_agent_` token for the Sending API.\n- A durable agent profile is read/receive-only. Do not treat its stored credential as send-capable.\n- Before owner acceptance and sending approval, agent-profile sends fail closed. After approval, the CLI exchanges and caches a one-hour delegated `email.send` token automatically.\n- The self-registered inbox is capped at 500 MiB before approval. Sending approval raises it to at least 5 GiB first; revoking delegated sending later does not shrink it.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload first with `sending_upload_attachment`, `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nBatch sends accept up to 100 messages. A batch response can partially succeed, so inspect every result item.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 100 each.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, `sending_upload_attachment`, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. Sending uploads cap each file at 18 MiB and the final sent message at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nBatch send body:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Local file upload before send: `sending_upload_attachment` with `file_path`.\n- Hosted or shell-capable upload before send: `sending_create_attachment_upload`, then `PUT` bytes to the returned URL with the returned headers and no Sendmux API key.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nInclude an idempotency key when the client exposes the header parameter. If the MCP client does not expose headers clearly, use CLI, SDK, or direct HTTP for retry-sensitive sends. For attachments through MCP, use `sendmux-attachments` so the agent chooses `file_path`, presigned upload, or tiny inline base64 correctly.\n\n## CLI\n\nFor a self-registered agent, use its profile instead of copying credentials:\n\n```bash\nsendmux sending:send \\\n  --profile my-agent \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-email.json \\\n  --json\n```\n\nThe owner must already have accepted the invitation and approved sending. The CLI obtains and caches the short-lived delegated token; the durable read credential is not used directly by the Sending API.\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.message_id, response.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl -X POST https://smtp.sendmux.ai/api/v1/emails/send \\\n  -H \"Authorization: Bearer $SENDMUX_MBX_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: $IDEMPOTENCY_KEY\" \\\n  -d @sendmux-email.json\n```\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1788258524673\n}\n\nFile v1.0.6:skill-card.md\n\n## Description:\n\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers and agents use this skill to prepare and send outbound Sendmux email through MCP, CLI, SDK, or HTTP workflows after the user confirms recipients and message content.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: An agent could send email to unintended recipients or with unintended content.\n\nMitigation: Confirm every recipient, subject, body, and batch item with the user before invoking any send-capable workflow.\n\nRisk: Sendmux credentials could be exposed if copied into chat or stored in prompts.\n\nMitigation: Use environment variables or approved credential profiles, and do not ask users to paste API keys into chat.\n\nRisk: Retrying sends without idempotency controls can create duplicate sends or idempotency conflicts.\n\nMitigation: Use a stable idempotency key for each retryable email or batch and inspect conflict responses before retrying.\n\nRisk: Attachments can exceed supported upload or message-size limits.\n\nMitigation: Use Sendmux attachment upload workflows and respect the documented per-file and final message limits before sending.\n\n## Reference(s):\n\n- [Sendmux skills repository](https://github.com/Sendmux/skills)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, markdown, code, shell commands, configuration]\n\n**Output Format:** [Markdown guidance with JSON payloads, TypeScript examples, shell commands, and HTTP examples.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include send payloads, idempotency keys, API calls, attachment references, and credential environment variable names; does not require users to paste secrets into chat.]\n\n## Skill Version(s):\n\n1.0.6 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.5: 3 files, 5150 bytes\n\nFiles: skill-card.md (2338b), SKILL.md (9658b), _meta.json (137b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.4.0\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key or owner-approved Sending-resource `smx_agent_` token for the Sending API.\n- A durable agent profile is read/receive-only. Do not treat its stored credential as send-capable.\n- Before owner acceptance and sending approval, agent-profile sends fail closed. After approval, the CLI exchanges and caches a one-hour delegated `email.send` token automatically.\n- The self-registered inbox is capped at 500 MiB before approval. Sending approval raises it to 5 GiB first; revoking delegated sending later does not shrink it.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload first with `sending_upload_attachment`, `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nBatch sends accept up to 100 messages. A batch response can partially succeed, so inspect every result item.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 100 each.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, `sending_upload_attachment`, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. Sending uploads cap each file at 18 MiB and the final sent message at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nBatch send body:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Local file upload before send: `sending_upload_attachment` with `file_path`.\n- Hosted or shell-capable upload before send: `sending_create_attachment_upload`, then `PUT` bytes to the returned URL with the returned headers and no Sendmux API key.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nInclude an idempotency key when the client exposes the header parameter. If the MCP client does not expose headers clearly, use CLI, SDK, or direct HTTP for retry-sensitive sends. For attachments through MCP, use `sendmux-attachments` so the agent chooses `file_path`, presigned upload, or tiny inline base64 correctly.\n\n## CLI\n\nFor a self-registered agent, use its profile instead of copying credentials:\n\n```bash\nsendmux sending:send \\\n  --profile my-agent \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-email.json \\\n  --json\n```\n\nThe owner must already have accepted the invitation and approved sending. The CLI obtains and caches the short-lived delegated token; the durable read credential is not used directly by the Sending API.\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.message_id, response.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl -X POST https://smtp.sendmux.ai/api/v1/emails/send \\\n  -H \"Authorization: Bearer $SENDMUX_MBX_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: $IDEMPOTENCY_KEY\" \\\n  -d @sendmux-email.json\n```\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1788242759278\n}\n\nFile v1.0.5:skill-card.md\n\n## Description:\n\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and external users use this skill to prepare and send single or batch outbound emails through Sendmux using MCP, CLI, SDK, or HTTP paths with confirmation, credential-safety, attachment, and idempotency guidance.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: An agent could send email to unintended recipients or with incorrect message content.\n\nMitigation: Confirm the sender, recipients, subject, body, attachments, and batch list before any send operation.\n\nRisk: Sendmux API or mailbox credentials could be exposed if pasted into chat.\n\nMitigation: Use scoped Sendmux credentials, environment variables, agent profiles, or delegated tokens instead of sharing secrets in conversation.\n\nRisk: Retries could duplicate sends or produce idempotency conflicts.\n\nMitigation: Use one stable Idempotency-Key per logical email or batch and handle 409 conflicts deliberately.\n\nRisk: Batch sends, attachments, or oversized requests can fail partially or exceed service limits.\n\nMitigation: Inspect every batch result and use supported attachment upload paths while respecting documented message and file-size limits.\n\n## Reference(s):\n\n- [Sendmux skills repository](https://github.com/Sendmux/skills)\n- [Sendmux Sending API endpoint](https://smtp.sendmux.ai/api/v1/emails/send)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown with JSON, bash, TypeScript, and HTTP examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Requires user confirmation of sender, recipients, subject, body, attachments, and batch list before sending.]\n\n## Skill Version(s):\n\n1.0.5 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.0.4: 3 files, 5078 bytes\n\nFiles: skill-card.md (2793b), SKILL.md (9132b), _meta.json (137b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.3.0\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key or owner-approved Sending-resource `smx_agent_` token for the Sending API.\n- Do not use a pre-claim `smx_agent_` token for sending. Pre-claim self-registered agent tokens have `mailbox.read` and `email.receive`, not `email.send`.\n- If using a self-registered agent, obtain the Sending-resource `smx_agent_` token by exchanging the saved `claim_token` after owner approval with `resource=https://smtp.sendmux.ai/api/v1`.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload first with `sending_upload_attachment`, `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nBatch sends accept up to 100 messages. A batch response can partially succeed, so inspect every result item.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 100 each.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, `sending_upload_attachment`, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. Sending uploads cap each file at 18 MiB and the final sent message at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nBatch send body:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Local file upload before send: `sending_upload_attachment` with `file_path`.\n- Hosted or shell-capable upload before send: `sending_create_attachment_upload`, then `PUT` bytes to the returned URL with the returned headers and no Sendmux API key.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nInclude an idempotency key when the client exposes the header parameter. If the MCP client does not expose headers clearly, use CLI, SDK, or direct HTTP for retry-sensitive sends. For attachments through MCP, use `sendmux-attachments` so the agent chooses `file_path`, presigned upload, or tiny inline base64 correctly.\n\n## CLI\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.message_id, response.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl -X POST https://smtp.sendmux.ai/api/v1/emails/send \\\n  -H \"Authorization: Bearer $SENDMUX_MBX_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: $IDEMPOTENCY_KEY\" \\\n  -d @sendmux-email.json\n```\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783569527642\n}\n\nFile v1.0.4:skill-card.md\n\n## Description: <br>\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agents use this skill to prepare and send outbound email through Sendmux, including single messages, batch sends, idempotent retries, and attachment workflows. It is intended for workflows where the user has supplied or confirmed recipients, sender details, message content, and credentials. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sendmux credentials can be exposed if pasted into chat, command output, logs, screenshots, or shared files. <br>\nMitigation: Use scoped Sendmux credentials stored in environment variables or a secret manager, and avoid printing or pasting secrets. <br>\nRisk: An agent could send email to the wrong recipients or with unintended content if message details are incomplete or assumed. <br>\nMitigation: Require the user to supply or confirm every recipient, sender, subject, and message body before sending, including the full set for batch sends. <br>\nRisk: Attachments may upload local files to Sendmux for delivery. <br>\nMitigation: Review selected files before upload, use attachment-specific workflows for local files, and avoid sending sensitive files unless the user explicitly approves. <br>\nRisk: Retrying a send without idempotency can create duplicate outbound email. <br>\nMitigation: Use one stable Idempotency-Key per logical email or batch whenever a send may be retried. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email) <br>\n- [Sendmux skills homepage](https://github.com/Sendmux/skills) <br>\n- [Sendmux Sending API endpoint](https://smtp.sendmux.ai/api/v1/emails/send) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with JSON examples, TypeScript snippets, and shell commands] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include Sendmux request bodies, idempotency-key guidance, attachment handling steps, CLI, SDK, MCP, or direct HTTP examples.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.3: 3 files, 4742 bytes\n\nFiles: skill-card.md (1943b), SKILL.md (9132b), _meta.json (137b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.2.0\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key or owner-approved Sending-resource `smx_agent_` token for the Sending API.\n- Do not use a pre-claim `smx_agent_` token for sending. Pre-claim self-registered agent tokens have `mailbox.read` and `email.receive`, not `email.send`.\n- If using a self-registered agent, obtain the Sending-resource `smx_agent_` token by exchanging the saved `claim_token` after owner approval with `resource=https://smtp.sendmux.ai/api/v1`.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload first with `sending_upload_attachment`, `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nBatch sends accept up to 100 messages. A batch response can partially succeed, so inspect every result item.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 100 each.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, `sending_upload_attachment`, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. Sending uploads cap each file at 18 MiB and the final sent message at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nBatch send body:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Local file upload before send: `sending_upload_attachment` with `file_path`.\n- Hosted or shell-capable upload before send: `sending_create_attachment_upload`, then `PUT` bytes to the returned URL with the returned headers and no Sendmux API key.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nInclude an idempotency key when the client exposes the header parameter. If the MCP client does not expose headers clearly, use CLI, SDK, or direct HTTP for retry-sensitive sends. For attachments through MCP, use `sendmux-attachments` so the agent chooses `file_path`, presigned upload, or tiny inline base64 correctly.\n\n## CLI\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.message_id, response.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl -X POST https://smtp.sendmux.ai/api/v1/emails/send \\\n  -H \"Authorization: Bearer $SENDMUX_MBX_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: $IDEMPOTENCY_KEY\" \\\n  -d @sendmux-email.json\n```\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783561592367\n}\n\nFile v1.0.3:skill-card.md\n\n## Description: <br>\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agent operators use this skill to prepare and execute outbound Sendmux email workflows after confirming recipients, sender details, message content, credentials, and attachments. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Outbound email workflows can contact incorrect or excessive recipients if message details, credentials, or batch payloads are not reviewed before sending. <br>\nMitigation: Use scoped Sendmux credentials or approved agent tokens, confirm every sender, recipient, subject, body, and attachment, and review batch results because partial success is possible. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email) <br>\n- [Sendmux skills homepage](https://github.com/Sendmux/skills) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [guidance, markdown, code, shell commands, configuration] <br>\n**Output Format:** [Markdown with JSON, TypeScript, and shell command examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include idempotency keys, Sendmux API payloads, attachment handling guidance, and credential environment variable names.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: ClawHub release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.2: 3 files, 4935 bytes\n\nFiles: skill-card.md (2396b), SKILL.md (9132b), _meta.json (137b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.1.0\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key or owner-approved Sending-resource `smx_agent_` token for the Sending API.\n- Do not use a pre-claim `smx_agent_` token for sending. Pre-claim self-registered agent tokens have `mailbox.read` and `email.receive`, not `email.send`.\n- If using a self-registered agent, obtain the Sending-resource `smx_agent_` token by exchanging the saved `claim_token` after owner approval with `resource=https://smtp.sendmux.ai/api/v1`.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSendEmail`.                                          |\n| More than one independent outbound email  | Batch by default: `POST /emails/send/batch`, MCP `sending_send_email_batch`, CLI `sending:send:batch`, or SDK `sendingSendEmailBatch`. |\n| Sending API attachment file               | Upload first with `sending_upload_attachment`, `sending_create_attachment_upload`, CLI `--attach`, or SDK file helpers; send by `attachment_id`. |\n| Replying while working inside one mailbox | Use mailbox send from `sendmux-mailbox-agent` when the workflow is mailbox-centred.                                                    |\n| Existing app only supports SMTP           | Use SMTP only because the existing tool requires it. For new agent or app integrations, prefer the HTTP Sending API.                   |\n\nBatch sends accept up to 100 messages. A batch response can partially succeed, so inspect every result item.\n\n## Required JSON shape\n\nSingle send body:\n\n```json\n{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}\n```\n\nRequired fields: `from`, `to`, `subject`, `html_body`.\n\nUseful optional fields:\n\n- `text_body`: plain text alternative.\n- `cc`, `bcc`: arrays of recipients, max 100 each.\n- `reply_to`: one address object.\n- `return_path`: envelope sender for bounce handling.\n- `custom_headers`: custom `X-*` headers.\n- `attachments`: up to 10 items. Prefer uploaded refs `{ \"attachment_id\": \"att_...\" }`. Inline compatibility form uses `filename` plus base64 `content`, optional `type`, and `encoding: \"base64\"`.\n\nFor real local files, do not ask the model to produce base64. Route attachment-heavy work to `sendmux-attachments`; use CLI `--attach`, SDK file helpers, `sending_upload_attachment`, or delegated `sending_create_attachment_upload`, then pass `attachment_id` refs. Sending uploads cap each file at 18 MiB and the final sent message at 25 MB. Mailbox `blob_id` refs are for mailbox sends, not Sending API sends.\n\nBatch send body:\n\n```json\n{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}\n```\n\n## Idempotency\n\nAdd `Idempotency-Key` to every send that may be retried. Use one stable key per logical email or batch.\n\n- Same key and same body: returns the cached response for 24 hours.\n- Same key and different body: returns `409 idempotency_conflict`.\n- Keep keys under 255 characters.\n\n## MCP\n\nUse MCP when the user's agent already has the Sending server connected:\n\n- One message: `sending_send_email`.\n- Multiple messages: `sending_send_email_batch`.\n- Local file upload before send: `sending_upload_attachment` with `file_path`.\n- Hosted or shell-capable upload before send: `sending_create_attachment_upload`, then `PUT` bytes to the returned URL with the returned headers and no Sendmux API key.\n- Metadata check for a temporary uploaded attachment: `sending_get_attachment`.\n\nInclude an idempotency key when the client exposes the header parameter. If the MCP client does not expose headers clearly, use CLI, SDK, or direct HTTP for retry-sensitive sends. For attachments through MCP, use `sendmux-attachments` so the agent chooses `file_path`, presigned upload, or tiny inline base64 correctly.\n\n## CLI\n\nOne email:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json\n```\n\nBatch:\n\n```bash\nSENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json\n```\n\nUse `--attach ./file.pdf` for local files; the CLI uploads bytes first and injects `attachment_id` refs before sending. Use `--body-file` for larger JSON payloads or already-prepared Sending API attachment objects.\n\n## TypeScript SDK\n\nOne email:\n\n```ts\nimport { createSendingClient, sendingSendEmail } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmail({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    from: { email: \"sender@example.com\", name: \"Sender Name\" },\n    to: { email: \"recipient@example.com\", name: \"Recipient Name\" },\n    subject: \"Subject line\",\n    html_body: \"<p>Hello.</p>\",\n    text_body: \"Hello.\",\n  },\n});\n\nconsole.log(response.data.message_id, response.data.status);\n```\n\nBatch:\n\n```ts\nimport { createSendingClient, sendingSendEmailBatch } from \"@sendmux/sending\";\n\nconst client = createSendingClient({ apiKey: process.env.SENDMUX_API_KEY! });\n\nconst response = await sendingSendEmailBatch({\n  client,\n  headers: { \"Idempotency-Key\": idempotencyKey },\n  body: {\n    messages,\n  },\n});\n\nfor (const result of response.data.results) {\n  console.log(result.index, result.status, result.message_id, result.error);\n}\n```\n\n## Direct HTTP\n\nUse direct HTTP only when MCP, CLI, or SDK is unavailable:\n\n```bash\ncurl -X POST https://smtp.sendmux.ai/api/v1/emails/send \\\n  -H \"Authorization: Bearer $SENDMUX_MBX_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: $IDEMPOTENCY_KEY\" \\\n  -d @sendmux-email.json\n```\n\n## Responses and errors\n\nSingle send success returns a `200` success envelope with:\n\n- `data.message_id`: `eml_...`\n- `data.status`: `queued`\n\nBatch success returns a `200` success envelope with:\n\n- `data.summary.total`\n- `data.summary.queued`\n- `data.summary.failed`\n- `data.results[]` containing `index`, `status`, `message_id`, and optional `error`\n\nHandle these errors deliberately:\n\n- `401`: missing, invalid, or revoked key.\n- `402`: insufficient credits.\n- `403`: key lacks `email.send`, is not allowed for the sender, or uses the wrong surface.\n- `409`: idempotency conflict.\n- `413`: request body exceeds 25 MB.\n- `422`: validation failed; read `error.errors`.\n- `429` or `503`: retry according to response headers.\n\n## Routing\n\n- Setup/auth first call: `sendmux-getting-started`.\n- Attachment file paths, presigned upload URLs, and download URLs: `sendmux-attachments`.\n- Mailbox-centred replies: `sendmux-mailbox-agent`.\n- CLI-only details: `sendmux-cli`.\n- Cheapest-call decisions: `sendmux-token-efficient-usage`.\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1783483690652\n}\n\nFile v1.0.2:skill-card.md\n\n## Description: <br>\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agents use this skill to prepare and send Sendmux email through MCP, CLI, SDK, or direct HTTP workflows, including batch sends and attachment-aware delivery. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: An agent could send email to the wrong recipients or with unconfirmed content. <br>\nMitigation: Require the user to supply or confirm every recipient, subject, body, and full batch recipient/message set before sending. <br>\nRisk: Overbroad or exposed Sendmux credentials could allow unintended mail access or sending. <br>\nMitigation: Use scoped Sendmux credentials, avoid pasting secrets into chat, and use only send-capable mailbox keys or owner-approved Sending-resource agent tokens. <br>\nRisk: Attachment workflows may upload local files to Sendmux for delivery. <br>\nMitigation: Confirm attachment file paths, content, and size before upload, then send by attachment_id references where possible. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Listing](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email) <br>\n- [Sendmux Skills Repository](https://github.com/Sendmux/skills) <br>\n- [Sendmux Sending API](https://smtp.sendmux.ai/api/v1) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [guidance, shell commands, code, configuration] <br>\n**Output Format:** [Markdown guidance with JSON request bodies, shell commands, TypeScript examples, and HTTP examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Includes recipient-confirmation guidance, idempotency-key handling, batch-send handling, attachment upload guidance, and routing to related Sendmux skills.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>","readmeExcerpt":"Skill: sendmux-send-email Owner: sendmux.ai Summary: Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP. Tags: latest:1.0.11 Version history: v1.0.11 | 2026-10-02T04:23:21.981Z | auto sendmux-send-email 1.0.11 - Version bump in SKILL.md from 1.7.0 to 1.7.1. - Removed the file: skill-card.md. - No functional or instructional chang","codeSnippets":[],"executableExamples":[{"language":"json","snippet":"{\n  \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n  \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n  \"subject\": \"Subject line\",\n  \"html_body\": \"<p>Hello.</p>\",\n  \"text_body\": \"Hello.\"\n}"},{"language":"http","snippet":"POST /emails/send/batch HTTP/1.1\nAuthorization: Bearer $SENDMUX_MBX_KEY\nContent-Type: application/json\nIdempotency-Key: $IDEMPOTENCY_KEY"},{"language":"json","snippet":"{\n  \"messages\": [\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"alice@example.com\" },\n      \"subject\": \"Hello Alice\",\n      \"html_body\": \"<p>Hi Alice.</p>\"\n    },\n    {\n      \"from\": { \"email\": \"sender@example.com\" },\n      \"to\": { \"email\": \"bob@example.com\" },\n      \"subject\": \"Hello Bob\",\n      \"html_body\": \"<p>Hi Bob.</p>\"\n    }\n  ]\n}"},{"language":"bash","snippet":"sendmux sending:send \\\n  --profile my-agent \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-email.json \\\n  --json"},{"language":"bash","snippet":"SENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body '{\n    \"from\": { \"email\": \"sender@example.com\", \"name\": \"Sender Name\" },\n    \"to\": { \"email\": \"recipient@example.com\", \"name\": \"Recipient Name\" },\n    \"subject\": \"Subject line\",\n    \"html_body\": \"<p>Hello.</p>\",\n    \"text_body\": \"Hello.\"\n  }' \\\n  --json"},{"language":"bash","snippet":"SENDMUX_API_KEY=\"$SENDMUX_MBX_KEY\" sendmux sending:send:batch \\\n  --idempotency-key \"$IDEMPOTENCY_KEY\" \\\n  --body-file ./sendmux-batch.json \\\n  --json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"sendmux-send-email\"\ndescription: \"Send one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\"\nversion: \"1.7.1\"\nmetadata:\n  openclaw:\n    skillKey: \"sendmux-send-email\"\n    homepage: \"https://github.com/Sendmux/skills\"\n    primaryEnv: \"SENDMUX_API_KEY\"\n    envVars:\n      - name: \"SENDMUX_API_KEY\"\n        required: false\n        description: \"Optional Sendmux API key or scoped agent token used by CLI, SDK, HTTP, or MCP examples.\"\n      - name: \"SENDMUX_MBX_KEY\"\n        required: false\n        description: \"Optional Sendmux mailbox key for Mailbox and send-capable mailbox workflows.\"\n---\n\n# Sendmux send email\n\n## ClawHub account note\n\nThis ClawHub skill connects OpenClaw agents to Sendmux. Some workflows require a Sendmux account and an appropriate Sendmux API key or agent token. Sendmux account usage is external to ClawHub; do not ask users to paste secrets into chat.\n\nUse this skill when the user is ready to send outbound email through Sendmux or needs code/commands for sending.\n\n## Safety first\n\n- Do not ask the user to paste an API key.\n- Do not invent recipients, sender addresses, subject lines, or body content.\n- Send only after the user supplies or confirms every recipient and message.\n- For batch sends, confirm the full recipient/message set before calling a send tool.\n- Use a send-capable `smx_mbx_` key, owner-approved Sending-resource `smx_agent_` token, or REST OAuth grant with Sending access and `email.send` for the Sending HTTP API. SMTP requires a send-capable API key; OAuth access tokens are not SMTP or IMAP passwords.\n\nFor an agent-profile before/after approval answer, cover the complete lifecycle:\n\n| State | Required explanation |\n| --- | --- |\n| Before owner acceptance and sending approval | The durable credential is read/receive-only, sends fail closed, and the self-registered inbox is capped at 500 MiB. |\n| After sending approval | Storage rises to at least 5 GiB. The CLI automatically exchanges for a one-hour delegated `email.send` token and caches it only until near expiry; the sender supplies one stable `--idempotency-key` per logical send. |\n| After sending revocation | Sending becomes unavailable again, but revocation does not itself change the current inbox storage allocation. |\n\nSending approval supplies the required authority; it does not guarantee that a later request will pass validation or be accepted for delivery.\n\n## Choose the send path\n\n| User task                                 | Efficient default                                                                                                                      |\n| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |\n| One outbound email                        | `POST /emails/send`, MCP `sending_send_email`, CLI `sending:send`, or SDK `sendingSe"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn77z51yqhw8mt9vjfkpt8w74989rfb3\",\n  \"slug\": \"sendmux-send-email\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790915001981\n}"},{"path":"skill-card.md","content":"## Description:\n\nSend one or many emails through Sendmux using approved mailbox or agent credentials, idempotency keys, attachments, MCP, CLI, SDKs, or HTTP.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[sendmux.ai](https://clawhub.ai/user/sendmux.ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nOpenClaw users and developers use this skill to prepare or send individual and batch emails through Sendmux, including messages with attachments, after confirming the full message details.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Outbound messages could reach an unintended recipient or disclose sensitive content or attachments.\n\nMitigation: Review and confirm the sender, every recipient, subject, body, and attachment before each send or batch.\n\nRisk: Sendmux credentials could be exposed or grant broader sending access than needed.\n\nMitigation: Use scoped credentials and keep secrets out of chat.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/sendmux.ai/skills/sendmux-send-email)\n- [Sendmux skills homepage (declared in skill metadata)](https://github.com/Sendmux/skills)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Code]\n\n**Output Format:** [Markdown with JSON, shell, HTTP, and TypeScript examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Sending requires confirmed message details and appropriate Sendmux authorization.]\n\n## Skill Version(s):\n\n1.0.11 (source: ClawHub release metadata; skill frontmatter: 1.7.1)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1362,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T06:14:46.961Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T06:14:46.961Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:44:07.780Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}