Install
openclaw skills install @ymaievska-lang/sendpulse-smtp-skillSend transactional and bulk emails through SendPulse SMTP — via REST API or classic SMTP relay. Use this skill whenever the user wants to send email programmatically with SendPulse: "send email via SendPulse", "SendPulse SMTP API", "transactional email", "connect PHPMailer / nodemailer / smtplib to SendPulse", "why is my SendPulse email not delivered", "handle bounces / unsubscribes", "set up SPF/DKIM for SendPulse", "SendPulse webhooks". Covers OAuth authorization, sending endpoints, sender/domain setup, error troubleshooting, deliverability best practices, and the difference between SMTP (transactional) and Email Service (marketing campaigns).
openclaw skills install @ymaievska-lang/sendpulse-smtp-skillYou are helping a user send emails through SendPulse SMTP — a service for
transactional and bulk email delivery. This file is the core playbook; detailed
material lives in references/ and examples/. Load a reference file only when
the task needs it.
SendPulse has two email products that beginners constantly confuse. Ask what they are sending, then route:
| User goal | Product | Where |
|---|---|---|
| Order confirmations, password resets, notifications, invoices — one email per event, triggered by their app | SMTP | this skill |
| Newsletters, promo campaigns to a subscriber list, A/B tests, campaign statistics | Email Service (bulk) | the sendpulse-email-skill if installed (address books, segments, campaigns, analytics); overview fallback: references/email-service-api.md |
| Building the HTML of the email itself | — | the sendpulse-template-skill if installed, or any HTML email guide |
Within SMTP there are two transport options:
POST https://api.sendpulse.com/smtp/emails) — recommended default.
Structured JSON, message IDs for tracking, list management endpoints.
→ references/api-reference.mdsmtp-pulse.com:465, SSL) — when the user has an existing app,
CMS, plugin, or mail client that only speaks SMTP protocol (PHPMailer, nodemailer,
WordPress, CRM integrations). → references/smtp-relay.mdBefore writing any code, confirm these with the user. The API will not send a single email until all four are true:
ID/Secret) from
Settings → API (for REST), or the SMTP login/password from
SMTP → Settings → General (for relay).Full setup walkthrough: references/setup.md.
Two options; prefer the Single API Key — it's simpler and needs no refresh logic:
Authorization: Bearer <API_KEY> on every request — no token call at all.POST https://api.sendpulse.com/oauth/access_token
Content-Type: application/json
{"grant_type": "client_credentials", "client_id": "<ID>", "client_secret": "<Secret>"}
Response contains access_token (Bearer, valid 1 hour). Cache it and refresh on
HTTP 401 — do not request a new token per email.
Never hardcode keys or client_id/client_secret in code you generate — read them
from environment variables or a secrets manager.
SendPulse MCP server (https://mcp.sendpulse.com/mcp): for interactive
account work from an AI chat (checking senders, stats, the unsubscribe list) the
user can connect the hosted MCP server instead of writing one-off scripts. It does
NOT replace the API/relay integration inside the user's application — see
references/sendpulse-mcp.md for what it's good for and the setup.
Minimal working request (see references/quickstart.md for a copy-paste version):
POST https://api.sendpulse.com/smtp/emails
Authorization: Bearer <token>
Content-Type: application/json
{
"email": {
"subject": "Your order #1234 is confirmed",
"from": {"name": "My Shop", "email": "noreply@myshop.com"},
"to": [{"name": "Jane", "email": "jane@example.com"}],
"html": "<BASE64-ENCODED HTML>",
"text": "Plain-text version of the message"
}
}
html must be Base64-encoded. Raw HTML in this field fails or garbles the message.text version alongside html — it improves deliverability.from.email must be a verified sender in the account, on a corporate domain.to is an array of objects, even for one recipient: [{"email": "..."}].{"result": true, "id": "<message-id>"} — store the id;
it is the key for status lookup (GET /smtp/emails/{id}).attachments (plain-text content) or attachments_binary
(Base64-encoded) — an object of {"filename": content} pairs."template": {"id": 123, "variables": {...}}
instead of html.Full endpoint catalog (statistics, bounces, unsubscribe list, senders, IPs):
references/api-reference.md. Ready-to-run code: examples/curl.md,
examples/php.md, examples/python.md, examples/nodejs.md.
Bake these into any integration you build; do not treat them as optional:
GET /smtp/unsubscribe/search?email=....
Sending to unsubscribed users damages sender reputation and violates anti-spam law.GET /smtp/bounces/day. Remove hard-bounced addresses
from the user's own database permanently. SendPulse restricts SMTP accounts that
exceed the acceptable bounce rate.POST /smtp/unsubscribe to add addresses to the blocklist).Full guidance: references/deliverability.md. Real-time event tracking (delivered,
opened, clicked, bounced, spam complaints): references/webhooks.md.
When "email is not sending / not arriving", walk this checklist top-down. The full
error table with fixes is in references/errors.md.
html Base64-encoded? to an array of objects?/smtp/unsubscribe/search, /smtp/bounces/day)references/deliverability.mdPrefer plain HTTP examples for clarity, but mention the official libraries when the user's stack matches: PHP, Python, Node.js. Community wrappers exist for Ruby, Java, C#, and Go.
This skill is versioned (see version in the frontmatter above and the VERSION
file). If you have web access, you MAY check for a newer version once per
conversation when the skill is first used:
https://raw.githubusercontent.com/sendpulse/sendpulse-skills/main/sendpulse-smtp-skill/VERSIONgit pull in the sendpulse-skills clone, or
re-download from https://github.com/sendpulse/sendpulse-skills/tree/main/sendpulse-smtp-skill" — then
continue with the current version.If web access is unavailable, skip silently. Never block the user's task on the version check. When this skill and the live SendPulse documentation at https://sendpulse.com/integrations/api/smtp?utm_source=ai-agent&utm_medium=skill&utm_campaign=ai-skills&utm_content=sendpulse-smtp-skill disagree, the live documentation wins — say so and prefer it.