> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrating from Mailchimp & Mandrill

> How to migrate from Mailchimp marketing audiences and Mandrill transactional email to Mailofly's unified platform.

# Migrating from Mailchimp & Mandrill

For years, teams using Mailchimp have had to manage two distinct systems: **Mailchimp** for marketing newsletters and **Mandrill (Mailchimp Transactional)** for product receipts and authentication emails. Worse, Mailchimp charges for *unsubscribed* and inactive contacts, driving up monthly bills unnecessarily.

Mailofly unifies **transactional sending**, **broadcast campaigns**, and **contact audience management** into a single developer-friendly platform.

***

## Why Teams Switch from Mailchimp

* **Unified Platform**: Send both high-velocity transactional emails and visual marketing broadcasts from the same dashboard, API, and domain reputation.
* **Fair Contact Pricing**: Stop paying for contacts who unsubscribed months ago. Mailofly only bills for active sending and engaged audiences.
* **Modern Merge Syntax**: Replace quirky `*|MERGE_TAGS|*` with standard `{{variable}}` handlebars syntax or React Email components.
* **Instant Developer API**: Direct REST API and typed SDKs replace Mandrill's legacy API endpoints.

***

## 1. Syntax Comparison: Merge Tags vs Variables

Mailchimp uses legacy asterisk-pipe tags, while Mailofly uses clean, industry-standard handlebars:

| Purpose | Mailchimp / Mandrill Tag | Mailofly Syntax | | |
| :- | :- | :- | - | - |
| First Name | \`\* | FNAME | \*\` | `{{first_name}}` |
| Last Name | \`\* | LNAME | \*\` | `{{last_name}}` |
| Email Address | \`\* | EMAIL | \*\` | `{{email}}` |
| Unsubscribe URL | \`\* | UNSUB | \*\` | Handled automatically or `{{unsubscribe_url}}` |
| Current Year | \`\* | CURRENT\_YEAR | \*\` | `{{year}}` or template logic |
| Custom Variable | \`\* | COMPANY | \*\` | `{{company}}` |

***

## 2. Replacing Mandrill Transactional API

If your application sends transactional emails using the Mandrill client library:

```ts Before: Mandrill theme={null}
import mailchimpTx from "@mailchimp/mailchimp_transactional";

const mandrill = mailchimpTx(process.env.MANDRILL_API_KEY!);

const response = await mandrill.messages.send({
  message: {
    from_email: "orders@acme.com",
    from_name: "Acme Orders",
    to: [{ email: "customer@example.com", type: "to" }],
    subject: "Your receipt #9821",
    html: "<p>Thank you for your order, *|FNAME|*!</p>",
    global_merge_vars: [
      { name: "FNAME", content: "Alex" }
    ],
  },
});
```

```ts After: Mailofly theme={null}
import { Mailofly } from "@mailofly/node";

const mailofly = new Mailofly({
  apiKey: process.env.MAILOFLY_API_KEY!,
});

const { id } = await mailofly.emails.send({
  from: "Acme Orders <orders@acme.com>",
  to: ["customer@example.com"],
  subject: "Your receipt #9821",
  html: "<p>Thank you for your order, Alex!</p>",
});

console.log("Sent with Mailofly:", id);
```

***

## 3. Migrating Audiences, Tags & Suppressions

### Step 1: Export Contacts from Mailchimp

1. In the Mailchimp dashboard, navigate to **Audience → All contacts**.
2. Click **Export Audience → Export as CSV**.
3. Mailchimp will generate a ZIP archive containing separate CSV files:
   * `subscribed_members_export.csv`
   * `unsubscribed_members_export.csv`
   * `cleaned_members_export.csv` (Hard bounces and bad emails)

### Step 2: Import Suppressed & Unsubscribed Members

> [!WARNING]
>
> Always import your **unsubscribed** and **cleaned (bounced)** members first to ensure they are immediately marked as suppressed in Mailofly.

1. In the Mailofly dashboard, go to **[Audiences > Contacts](https://www.mailofly.com/user/audience)**.
2. Click **Import CSV**.
3. Upload `unsubscribed_members_export.csv` and select **Mark as Unsubscribed**.
4. Repeat for `cleaned_members_export.csv`, marking them as **Suppressed / Bounced**.

### Step 3: Import Active Subscribers

1. Click **Import CSV** and select `subscribed_members_export.csv`.
2. Map your columns:
   * `Email Address` → `email`
   * `First Name` → `first_name`
   * `Last Name` → `last_name`
   * Custom tags and groups → Mailofly **Custom Properties** or **Topics**.

***

## 4. Migrating Marketing Broadcasts

In Mailofly, newsletters and marketing blasts are created using **[Broadcasts](https://www.mailofly.com/user/broadcasts)**:

1. **Create Broadcast**: Choose between our visual rich-text/block editor, raw HTML, or React Email templates.
2. **Audience Segmentation**: Target specific groups using **Topics** (e.g. `Weekly Changelog`, `Special Offers`) or dynamic **Segments** based on subscriber properties.
3. **One-Click Unsubscribe Compliance**: Mailofly automatically injects RFC-8058 compliant `List-Unsubscribe` and `List-Unsubscribe-Post` headers into every broadcast, ensuring 100% compliance with Gmail and Yahoo 2024+ sender requirements.

***

## 5. Webhook Events Comparison

If you listen to Mailchimp Webhooks or Mandrill Inbound/Outbound Webhooks:

| Mailchimp / Mandrill Webhook | Mailofly Webhook Event |
| :- | :- |
| `subscribe` | `contact.created` / `contact.subscribed` |
| `unsubscribe` | `contact.unsubscribed` |
| `hard_bounce` / `cleaned` | `email.bounced` |
| `spam` | `email.complained` |
| `open` | `email.opened` |
| `click` | `email.clicked` |

***

## Migration Checklist

* [ ] Add sending domain in Mailofly and verify DKIM (`mailofly._domainkey`) and SPF.
* [ ] Export Mailchimp Audience CSVs (Subscribed, Unsubscribed, Cleaned).
* [ ] Import Unsubscribed and Cleaned contacts into Mailofly Suppressions.
* [ ] Import Subscribed contacts into Mailofly Contacts with Topics and Properties.
* [ ] Update merge tags in your email templates from `*|TAG|*` to `{{variable}}`.
* [ ] Replace `@mailchimp/mailchimp_transactional` code with `@mailofly/node`.
* [ ] Test transactional sends and broadcast previews.
* [ ] Downgrade or cancel your Mailchimp subscription to eliminate contact storage costs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.