---
title: "Migrate from Postmark to Nextmail"
description: "Move from Postmark to Nextmail: every field mapped, a code converter for Node.js, Python, Ruby, PHP and cURL, and the webhook events side by side."
url: "https://nextmail.sh/migrate/postmark"
---

[All migrations](https://nextmail.sh/migrate.md)

Migrate from Postmark

# Move from Postmark to Nextmail.

Point the Postmark SDK at Nextmail and keep your code, or convert it to the Nextmail SDK. Message streams, templates and webhooks are mapped field by field.

[Convert your code](https://nextmail.sh/migrate/postmark#convert) [Open mail](https://nextmail.sh/mail/inbox) [Get Started](https://nextmail.sh/signup.md)

## The same email, written both ways.

One message with a reply-to address and a tag, sent through Postmark and then through Nextmail.

```
1import * as postmark from 'postmark'2 3const client = new postmark.ServerClient(process.env.POSTMARK_SERVER_TOKEN)4 5const result = await client.sendEmail({6  From: 'Acme <billing@acme.com>',7  To: 'ada@example.com',8  ReplyTo: 'support@acme.com',9  Subject: 'Your invoice is ready',10  HtmlBody: '<p>Thanks for your order.</p>',11  Tag: 'invoice',12  MessageStream: 'outbound',13})14 15console.log(result.MessageID)
```

```
1import { init, nextmail } from '@nextmail/sdk'2 3init({ apiKey: process.env.NEXTMAIL_API_KEY })4 5const email = await nextmail.emails.send({6  from: 'Acme <billing@acme.com>',7  to: 'ada@example.com',8  replyTo: 'support@acme.com',9  subject: 'Your invoice is ready',10  html: '<p>Thanks for your order.</p>',11  tags: { tag: 'invoice' },12})13 14console.log(email.id)
```

## Field by field, what goes where.

Each option Postmark takes, and its place in Nextmail.

| Postmark | Nextmail | Notes |
| --- | --- | --- |
| `From, To, Cc, Bcc` | `from, to, cc, bcc` | Lists instead of comma separated strings. |
| `HtmlBody, TextBody` | `html, text` | Plain names for the two bodies. |
| `ReplyTo` | `replyTo` | One address per message. |
| `Tag, Metadata` | `tags` | Up to 10 key and value pairs. |
| `TrackOpens, TrackLinks` | `tracking: { opens, clicks }` | Two switches on each message. |
| `TemplateAlias, TemplateModel` | `template: { id, props }` | Recreate the template in Nextmail first. |
| `Attachments[].Name` | `attachments[].filename` | Base64 or bytes, 5 MB in total. |
| `Headers: [{ Name, Value }]` | `headers: { Name: Value }` | One object of names and values. |
| `MessageStream` | `broadcasts.send` | Broadcasts have a call of their own. |
| `sendEmailBatch` | `emails.sendBatch` | Up to 100 emails, each sent on its own. |

Converter

## Paste your Postmark code, get it back on Nextmail.

Pick where the code comes from and its language. Recognised keys are removed in your browser, and nothing you paste is kept.

From Postmark

Your Nextmail code appears here

Paste a file, or load an example, then convert.

0 of 12,000 characters Recognised keys are removed before sending.

## Beyond the code, four more steps.

1. 01
   
   Add your sending domain
   
   Add it in Nextmail and publish the DNS records it lists. Sending starts once the signing record answers.
2. 02
   
   Create an API key
   
   Keys start with oe\_live\_ and carry only the scopes you give them.
3. 03
   
   Move your webhooks
   
   Create an endpoint for the events listed below and check the X-OpenEmail-Signature header on every request.
4. 04
   
   Bring the rest with one key
   
   In Migrations, choose From a provider and paste a Postmark server token. Suppressions, templates and webhooks come across, and server tokens arrive as a checklist.

[Read the Postmark guide](https://nextmail.sh/docs/knowledge/developers/switch-from-postmark.md)

## Webhook events, renamed.

Each Postmark event and the Nextmail event that replaces it. Every request carries one event, signed.

| Postmark | Nextmail |
| --- | --- |
| `Delivery` | `email.delivered` |
| `Bounce` | `email.bounced` |
| `SpamComplaint` | `email.complained` |
| `Open` | `email.opened` |
| `Click` | `email.clicked` |
| `SubscriptionChange` | `contact.unsubscribed, contact.resubscribed, suppression.added, suppression.removed` |

## Moving from Postmark, answered.

## Moving from somewhere else?

Every guide has the same converter, field map and checklist.

- [Resend Migration guide Keep your code on the compatible API, or convert it.](https://nextmail.sh/migrate/resend.md)
- [SendGrid Migration guide Personalizations, dynamic templates and event webhooks.](https://nextmail.sh/migrate/sendgrid.md)
- [Mailgun Migration guide Domains, o: options and v: variables.](https://nextmail.sh/migrate/mailgun.md)

## Converted? Create the key it reads.

A workspace takes a minute. Add your domain, create an API key and set NEXTMAIL\_API\_KEY.

[Open mail](https://nextmail.sh/mail/inbox) [Get Started](https://nextmail.sh/signup.md)[Read the SDK docs](https://nextmail.sh/docs/sdk.md)
