# ZeptoMail (/docs/v/0.6.0/adapters/zeptomail)



<ProviderBadge adapter="zeptomail" />

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 [#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 [#configure]

```ts
import { createEmailClient } from "@opencoredev/email-sdk";
import { zeptomail } from "@opencoredev/email-sdk/zeptomail";

const email = createEmailClient({
  adapters: [zeptomail({ token: process.env.ZEPTOMAIL_TOKEN! })],
});
```

## Send [#send]

```ts
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 [#send-text-only]

```ts
await email.send({
  from: "Acme <hello@acme.com>",
  to: "user@example.com",
  subject: "Plain update",
  text: "Your account has been updated.",
});
```

## Options [#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 [#response]

The adapter maps ZeptoMail `request_id`, `messageId`, or `id` to the normalized `id` field.

## CLI smoke test [#cli-smoke-test]

```bash
ZEPTOMAIL_TOKEN="..." npx email-sdk send \
  --adapter zeptomail \
  --from "Acme <hello@acme.com>" \
  --to user@example.com \
  --subject "ZeptoMail test" \
  --text "It works"
```
