---
title: Mailchimp Transactional
description: Send through Mailchimp Transactional (Mandrill) with typed recipients, tags, and metadata, but no replyTo field.
sidebar:
  icon: "https://cdn.simpleicons.org/mailchimp"
---

## Capabilities

| Repeated headers | Idempotency | Scheduling | Personalized |
| ---------------- | ----------- | ---------- | ------------ |
| No               | `none`      | Yes        | `expanded`   |

These values come from the adapter's exported `capabilities` declaration. The [field support matrix](/v1.2.0/docs/adapters/field-support) covers normalized message fields.

The Mailchimp adapter calls the [Mailchimp Transactional API](https://mailchimp.com/developer/transactional/api/messages/send-new-message/), the API formerly known as Mandrill, with plain `fetch`. Unusually, the API key travels in the request body rather than a header, and recipients are a single typed list (`to`/`cc`/`bcc` entries) instead of separate arrays.



**[Mailchimp Transactional](https://mailchimp.com/features/transactional-email)** · `@opencoredev/email-sdk/mailchimp` · [setup guide](/docs/adapters/mailchimp)



## Configure

Create a Transactional API key in the Mandrill dashboard (Settings → SMTP & API Info) and verify your sending domain.

```ts title="lib/email.ts"
import { createEmailClient } from "@opencoredev/email-sdk";
import { mailchimp } from "@opencoredev/email-sdk/mailchimp";

export const email = createEmailClient({
  adapters: [mailchimp({ apiKey: process.env.MAILCHIMP_API_KEY! })],
});
```

| Prop | Type | Default | Description |
| - | - | - | - |
| `apiKey` | `string` | - | Mailchimp Transactional (Mandrill) API key, sent in the request body. |
| `baseUrl?` | `string` | `"https://mandrillapp.com/api/1.0"` | Override the API origin, e.g. for a proxy. |
| `fetch?` | `typeof fetch` | - | Custom fetch implementation for tests or special runtimes. |

## Send

Mailchimp maps `cc`, `bcc`, `headers`, `attachments`, `tags` (values only), and `metadata`. `sendAt` maps to Mailchimp's `send_at` (a UTC timestamp), and Mailchimp only schedules email for accounts with a positive balance.

```ts
const result = await email.send({
  from: "Acme <hello@acme.com>",
  to: [{ email: "user@example.com", name: "Ada" }],
  subject: "Your order has shipped",
  html: "<p>Order ord_123 is on its way.</p>",
  metadata: { orderId: "ord_123" },
  tags: [{ name: "type", value: "shipping" }],
});

console.log(result.id); // Mandrill _id of the first recipient result
```

Mandrill responds with one result per recipient; the normalized `id` comes from the first result's `_id`. Each result also carries a per-recipient status (`sent`, `queued`, `rejected`). If a send succeeds but mail does not arrive, check `result.raw` during smoke tests, because a `rejected` status still counts as a successful API call.

:::warning[No replyTo field]
This adapter does not support `replyTo`; setting it throws an `EmailValidationError` before
any request is made. Set a `Reply-To` header instead: `headers: [{ name: "Reply-To", value:
  "support@acme.com" }]`. See [field support](/v1.2.0/docs/adapters/field-support) for the full matrix.
:::

## Verify from the CLI

```bash
MAILCHIMP_API_KEY="md-..." npx email-sdk doctor --adapter mailchimp
```

```bash
MAILCHIMP_API_KEY="md-..." npx email-sdk send \
  --adapter mailchimp \
  --from "Acme <hello@acme.com>" \
  --to user@example.com \
  --subject "Mailchimp smoke test" \
  --text "It works" \
  --dry-run
```

Drop `--dry-run` for one real send and check the per-recipient status in the output; Mandrill can accept the request and still reject the recipient.
