ZeptoMail
Send through Zoho ZeptoMail with automatic send-mail token prefixing.
Capabilities
| Repeated headers | Idempotency | Scheduling | Personalized |
|---|---|---|---|
| No | none |
No | expanded |
These values come from the adapter’s exported capabilities declaration. The field support matrix covers normalized message fields.
The ZeptoMail adapter calls the Zoho ZeptoMail email API with plain fetch. Paste your send mail token as-is: the adapter prepends Zoho’s Zoho-enczapikey authorization prefix automatically when it is missing.
Configure
Create a Mail Agent in ZeptoMail, copy its send mail token, and verify the sending domain.
import { createEmailClient } from "@opencoredev/email-sdk";
import { zeptomail } from "@opencoredev/email-sdk/zeptomail";
export const email = createEmailClient({
adapters: [zeptomail({ token: process.env.ZEPTOMAIL_TOKEN! })],
});
tokenstring
ZeptoMail send mail token. Works with or without the "Zoho-enczapikey " prefix.
stringbaseUrl?string
Override the API origin, e.g. for a proxy.
string"https://api.zeptomail.com"fetch?typeof fetch
Custom fetch implementation for tests or special runtimes.
typeof fetchSend
ZeptoMail maps cc, bcc, replyTo, and attachments. Display names carry through to ZeptoMail’s email_address recipient objects, and html/text become htmlbody/textbody.
const result = await email.send({
from: { email: "security@acme.com", name: "Acme Security" },
to: [{ email: "user@example.com", name: "Ada" }],
replyTo: "support@acme.com",
subject: "Reset your password",
html: '<p><a href="https://acme.com/reset?t=abc123">Reset your password</a></p>',
text: "Reset your password: https://acme.com/reset?t=abc123",
});
console.log(result.id); // ZeptoMail request_id (falls back to messageId or id)
Verify from the CLI
ZEPTOMAIL_TOKEN="..." npx --package @opencoredev/email-sdk email-sdk doctor --adapter zeptomail
ZEPTOMAIL_TOKEN="..." npx --package @opencoredev/email-sdk email-sdk send \
--adapter zeptomail \
--from "Acme <hello@acme.com>" \
--to user@example.com \
--subject "ZeptoMail smoke test" \
--text "It works" \
--dry-run
Drop --dry-run to send for real. ZeptoMail scopes each token to one Mail Agent, so a valid token can still fail when the from domain is not verified under that agent. Only a live send confirms the token, the agent, and the sender domain all line up.
Frequently asked questions
Does Email SDK support ZeptoMail?
Yes. Email SDK ships a ZeptoMail adapter imported from @opencoredev/email-sdk/zeptomail. You keep your ZeptoMail account and credentials; the SDK adds message validation, typed errors, and no-network test adapters around the same send() call used for every other provider.
Which message fields does the ZeptoMail adapter support?
ZeptoMail supports CC recipients, BCC recipients, Reply-To address, and Attachments. It does not support Custom headers, Tags, Metadata, and Scheduled sending (sendAt); Email SDK rejects a message that uses those fields before any request is made.
Can ZeptoMail schedule email for later with Email SDK?
No. ZeptoMail has no provider-side scheduling, so a message with sendAt fails validation. Store the job in your own queue and send when it is due.
Does the ZeptoMail adapter support idempotent sends?
No. ZeptoMail has no provider-side idempotency, so a retried send can be delivered twice. A send with idempotencyKey on a route that includes ZeptoMail fails with EmailValidationError unless you pass idempotency: “best-effort”. Deduplicate in your own queue before retrying.