Adapters
ZeptoMail
Configure the Zoho ZeptoMail adapter.
ZeptoMail
@opencoredev/email-sdk/zeptomailOfficialNot API testedRequest tested
ZeptoMail supports recipient objects, CC, BCC, reply-to, and attachments. It intentionally rejects headers, metadata, and tags because the adapter does not map them to the ZeptoMail API.
Before live sends
Create a ZeptoMail API token and verify the sending domain in Zoho ZeptoMail. The adapter accepts tokens with or without the Zoho-enczapikey prefix.
Configure
import { createEmailClient } from "@opencoredev/email-sdk";
import { zeptomail } from "@opencoredev/email-sdk/zeptomail";
const email = createEmailClient({
adapters: [zeptomail({ token: process.env.ZEPTOMAIL_TOKEN! })],
});Send
const result = await email.send({
from: { email: "hello@acme.com", name: "Acme" },
to: [{ email: "user@example.com", name: "Ada" }],
cc: "billing@example.com",
replyTo: "support@example.com",
subject: "ZeptoMail test",
html: "<p>It works.</p>",
attachments: [
{
filename: "receipt.txt",
content: "Thanks for your order.",
contentType: "text/plain",
},
],
});
console.log(result.provider, result.id);ZeptoMail supports recipients, reply-to, and attachments. It rejects headers, metadata, and tags before the API call.
Send text only
await email.send({
from: "Acme <hello@acme.com>",
to: "user@example.com",
subject: "Plain update",
text: "Your account has been updated.",
});Options
| Option | Type | Required | Notes |
|---|---|---|---|
token | string | Yes | ZeptoMail API token. The adapter adds the Zoho-enczapikey prefix if needed. |
baseUrl | string | No | Defaults to https://api.zeptomail.com. |
fetch | typeof fetch | No | Useful for tests or custom runtimes. |
ZeptoMail supports recipients, reply-to, and attachments. Unsupported fields throw before the API call.
Response
The adapter maps ZeptoMail request_id, messageId, or id to the normalized id field.
CLI smoke test
ZEPTOMAIL_TOKEN="..." npx email-sdk send \
--adapter zeptomail \
--from "Acme <hello@acme.com>" \
--to user@example.com \
--subject "ZeptoMail test" \
--text "It works"