# Migrate from SMTP2GO

> Move from SMTP2GO to Emailit. Swap SMTP users and hosts, convert email/send API calls and templates, and move webhooks, suppressions and sender domains.

This guide maps SMTP2GO concepts, SMTP settings, API calls, webhooks, suppressions and templates to their Emailit equivalents. Read [Migrate to Emailit](/docs/migrate/) first for the overall order and how to run both providers in parallel.

## Concepts

| SMTP2GO | Emailit |
| --- | --- |
| Master account and subaccounts | Account and [workspaces](/docs/workspaces/). Each workspace has its own domains, keys, members and credits. |
| SMTP users | Your API key, used as the SMTP password. Create one key per app or server. |
| API keys with endpoint permissions | [API keys](/docs/developers/api-keys/): **Full Access**, or **Sending Only** optionally restricted to one domain |
| IP and address authentication | Not available. Every SMTP connection authenticates with an API key. |
| Sender domains | [Sending domains](/docs/domains/) |
| Single sender emails | Not available. Every From address must be on a verified domain. |
| Sandbox status on an SMTP user or API key | New workspaces are in [sandbox mode](/docs/workspaces/production-access/) and deliver only to workspace members. |
| Tracking and unsubscribe footer settings per SMTP user or API key | [Tracking](/docs/tracking/) per sending domain. Emailit doesn't add an unsubscribe footer to API or SMTP email. |
| Templates | [Templates](/docs/templates/) with an alias and versions, rendered with [Temple](/docs/templates/temple/) |
| Webhooks | [Webhooks](/docs/webhooks/) |
| Suppressions of addresses and domains | [Suppressions](/docs/suppressions/) of addresses |
| Reports and activity | **Email API → Emails** and **Email API → Logs** |
| Dedicated IPs and IP pools | [Dedicated IPs](/docs/deliverability/dedicated-ips/) on request |

If you rely on SMTP2GO's unsubscribe footer for newsletters, add your own unsubscribe link and `List-Unsubscribe` headers, or send them as Emailit [campaigns](/docs/campaigns/), which add the headers for you. In campaigns, add the visible link with `{{unsubscribe_url}}`. See [SMTP headers](/docs/smtp/headers/#add-list-unsubscribe-yourself).

## Switch SMTP settings

| Setting | SMTP2GO | Emailit |
| --- | --- | --- |
| Host | `mail.smtp2go.com`, or a regional host such as `mail-eu.smtp2go.com` | `smtp.emailit.com` |
| Port | `2525`, `587`, `25`, `8025` or `80` (STARTTLS), `465`, `8465` or `443` (TLS) | `587`, `2587`, `2525` or `25` (STARTTLS), `465` (TLS) |
| Username | The SMTP user's username | `emailit` |
| Password | The SMTP user's password | Your Emailit API key |

Emailit doesn't listen on ports `80`, `443`, `8025` or `8465`. If your network blocks `25` and `587`, use `2525` or `2587`. Each recipient becomes its own email in Emailit, and the `250` reply lists their IDs, or only the first ID when there are many recipients. See [SMTP settings](/docs/smtp/settings/) and [SMTP headers and replies](/docs/smtp/headers/).

## Update your API calls

SMTP2GO's `POST /v3/email/send` becomes `POST /v2/emails`. Addresses stay strings, but the field names change:

```bash title="Before: SMTP2GO"
curl https://api.smtp2go.com/v3/email/send \
  -H "X-Smtp2go-Api-Key: $SMTP2GO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sender": "Acme <hello@acme.com>",
    "to": ["ada@example.com"],
    "subject": "Your receipt",
    "text_body": "Thanks for your order.",
    "html_body": "<p>Thanks for your order.</p>"
  }'
```

```bash title="After: Emailit"
curl https://api.emailit.com/v2/emails \
  -H "Authorization: Bearer $EMAILIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "Acme <hello@acme.com>",
    "to": "ada@example.com",
    "subject": "Your receipt",
    "text": "Thanks for your order.",
    "html": "<p>Thanks for your order.</p>"
  }'
```

| SMTP2GO | Emailit |
| --- | --- |
| `X-Smtp2go-Api-Key` header, `api_key` in the body, or `Authorization: Bearer api-…` | `Authorization: Bearer secret_…` |
| `sender` | `from` |
| `to`, `cc`, `bcc` | `to`, `cc`, `bcc`, up to 50 each |
| `custom_headers` with `Reply-To` | `reply_to` |
| `custom_headers: [{ "header": "…", "value": "…" }]` | `headers: { "Name": "Value" }` |
| `subject` | `subject` |
| `text_body`, `html_body` | `text`, `html` |
| `attachments[]` with `filename`, `fileblob` or `url`, and `mimetype` | `attachments[]` with `filename`, `content` or `url`, and `content_type` |
| `inlines[]` | `attachments[]` with a `content_id`, referenced as `cid:` in the HTML |
| `template_id` and `template_data` | `template` (an alias or ID) and `variables` |
| `schedule` (up to 3 days ahead) | `scheduled_at` (ISO 8601 or plain English) |
| `fastaccept` | Not needed. Emailit queues every email for delivery and answers without waiting for it. |
| `POST /v3/email/batch` (up to 1,000 emails) | Not available. Send one request per message. |
| `POST /v3/email/mime` | Send the MIME message through the [SMTP relay](/docs/smtp/) |
| `200` with `email_id`, `succeeded`, `failed` and `failures` | `200` with `id` (`em_…`), `status: "accepted"` and, for several recipients, `ids` with one ID each. Errors use HTTP status codes. |

SMTP2GO has no per-email metadata or tracking settings. In Emailit, add `meta` to get your own values back in webhook events, and `tracking: { "loads": true, "clicks": true }` to override the domain's tracking. Add an `Idempotency-Key` header so retries are safe. See [Send an email](/docs/email-api/send-email/).

## Map webhook events

| SMTP2GO event | Emailit event |
| --- | --- |
| `processed` | `email.accepted` (API only) |
| `delivered` | `email.delivered` |
| `bounce` with `bounce` `soft` | `email.attempted` while Emailit retries, then `email.bounced` if every retry fails |
| `bounce` with `bounce` `hard` | `email.bounced` |
| `reject` | `email.suppressed` when the address has a `recipient` suppression. Other rejections, such as an unverified sender, are errors in the API response or the SMTP reply. |
| `spam` | `email.complained` |
| `open` | `email.loaded` |
| `click` | `email.clicked` |
| `unsubscribe` | `email.unsubscribed`, for campaign email only |

The request format changes:

- SMTP2GO posts one event per request, as form fields by default or as flat JSON. Emailit posts a JSON array of up to 100 events, so loop over the body.
- The event name moves from `event` to `type`, and the email is in `data.object`. Use `data.object.id`, the `em_` ID from the send response or the SMTP reply, instead of `email_id`, and `data.object.to` instead of `rcpt`. Values you passed in `meta` are in `data.object.meta`.
- For `email.loaded` and `email.clicked`, `data.object` is the load or the click. Use `data.object.email_id` for the email's ID, and `data.object.email.rcpt_to` and `data.object.email.meta` for the recipient and your `meta` values.
- SMTP2GO doesn't sign webhooks. Emailit signs every request: verify `X-Emailit-Signature` against `X-Emailit-Timestamp` and your `whsec_` secret. See [Request signature](/docs/webhooks/request-signature/).

```javascript
for (const event of req.body) {
  const email = event.data.object;
  if (event.type === 'email.bounced') markBounced(email.to, email.id);
  if (event.type === 'email.complained') unsubscribe(email.to);
}
```

## Move suppressions

1. Export your suppressions from **Reports > Suppressions** with **Export**, or page through `POST /v3/suppression/view`. The API returns about the last 30 days unless you set `start_date`, so set it to cover your whole history.

2. Build one CSV with the columns `email,type,reason`:

   | SMTP2GO reason | Emailit type |
   | --- | --- |
   | `bounce`, `spam`, `manual` | `recipient`, which blocks API, SMTP and campaign sends |
   | `unsubscribe` | `unsubscribe`, which stops campaigns but still lets transactional email through. Use `recipient` if the person opted out of everything you send. |

```csv
email,type,reason
old-address@example.com,recipient,smtp2go bounce
left@example.com,unsubscribe,smtp2go unsubscribe
```

3. In **Email API → Suppressions**, select **Import** and upload the file. Each file can have up to 10,000 rows and can be at most 8 MB. Duplicates are skipped.

Emailit suppresses exact addresses, so domain suppressions can't be imported. Repeat the export for each subaccount and import it into the matching workspace. See [Manage suppressions](/docs/suppressions/manage/).

## Move templates

Get each template's HTML with `POST /v3/template/view`, which returns `html_body`, `text_body` and `subject`, or copy it from **Settings > Templates**. Import it in **Email Marketing → Templates** or create it with the [Templates API](/docs/api-reference/templates/create/), and use the SMTP2GO template ID as the alias if it fits the alias format of lowercase letters, numbers, `-` and `_`.

SMTP2GO ignores `subject` when you send a template. Emailit uses the template's subject unless the request has one, so leave `subject` out to keep the template's.

SMTP2GO templates use Handlebars. Temple covers the common parts:

| SMTP2GO (Handlebars) | Emailit (Temple) |
| --- | --- |
| `{{ username }}`, `{{ user.name }}` | `{{username}}`, `{{user.name}}` |
| `{{{ html_block }}}` | `{{html_block}}`. Temple never escapes HTML, so escape user input yourself. |
| `{{#if plan}}…{{else}}…{{/if}}` | The same |
| `{{#each items}}…{{/each}}` | Not supported. Render the list in your code and pass it as one variable. |
| No built-in default | `{{username\|"there"}}` adds a fallback |
| `template_data` | `variables` |

See [Temple](/docs/templates/temple/) and [Import and export templates](/docs/templates/import-export/).

## Change DNS

Add your domain in **Email API → Domains** and publish the Emailit records. They use their own names (`emailit._domainkey`, `emailit.<domain>`, and optionally `go` and `inbound`), so they don't conflict with SMTP2GO's `s<number>._domainkey` DKIM CNAME, its `em<number>` return-path CNAME or its `link` tracking CNAME. Keep your DMARC record. See [DNS records](/docs/domains/dns-records/).

After the cutover, remove the SMTP2GO CNAMEs, and `include:spf.smtp2go.com` if your SPF record still has it.

## Next steps

- [Go-live checklist](/docs/get-started/go-live/)
- [SMTP troubleshooting](/docs/smtp/troubleshooting/)
- [Priority migration](/docs/programs/priority-migration/): let Emailit engineers do the move with you

---
Source: https://emailit.com/docs/migrate/smtp2go/
