Migrating from Postmark

From Postmark to Hermaily, changing only the URL

Hermaily accepts Postmark sending requests on the same paths and with the same token header. Keep postmark, postmark-php or postmark-python: you only change the host and the token.

  • Paths /email, /email/batch
  • SMTP smtp.hermaily.com:587
  • Webhooks in Postmark format

Who it is for and what you gain

  • You use Postmark for transactional email and perhaps its broadcast stream, and you want to keep your code.
  • You want your data and your sending in the European Union, under a GDPR data processing agreement.
  • You want to pay less for volume: compare the prices in the table below.

Steps

  1. Create your account and verify your domain. In the dashboard, under Domains, the assistant gives you the DKIM, SPF (MAIL FROM) and DMARC records and checks they are published. They can live alongside Postmark's: they do not clash. New accounts are reviewed before they can send.
  2. Create an API key for that domain (one per application: if one is compromised, you revoke only that one).
  3. Create the webhook in Postmark format, under Webhooks, with your current receiver's URL. The Test button sends you a sample event.
  4. Change the base URL (or the SMTP host) and the key in your application. That is all: the rest of the code stays as it is.
  5. Send a test and look at it in the dashboard, with its delivery. When everything is fine, retire your Postmark key.

Code before and after

With Postmark's official library for each language. The highlighted lines are the ones that change.

Node.js · postmark

Node.js · before
const postmark = require("postmark");
const client = new postmark.ServerClient(process.env.POSTMARK_SERVER_TOKEN);

await client.sendEmail({
  From: "hello@acme.example",
  To: "lucia@example.com",
  Subject: "Your order is on its way",
  HtmlBody: "<p>Hi Lucía, your order has shipped.</p>",
  MessageStream: "outbound",
});
Node.js · after
const postmark = require("postmark");
const client = new postmark.ServerClient(process.env.HERMAILY_API_KEY, {  requestHost: "api.hermaily.com",});
await client.sendEmail({
  From: "hello@acme.example",
  To: "lucia@example.com",
  Subject: "Your order is on its way",
  HtmlBody: "<p>Hi Lucía, your order has shipped.</p>",
  MessageStream: "outbound",
});

PHP · wildbit/postmark-php

PHP · before
use Postmark\PostmarkClient;

$client = new PostmarkClient(getenv('POSTMARK_SERVER_TOKEN'));
$client->sendEmail(
    'hello@acme.example',
    'lucia@example.com',
    'Your order is on its way',
    '<p>Hi Lucía, your order has shipped.</p>'
);
PHP · after
use Postmark\PostmarkClient;
use Postmark\PostmarkClientBase;
PostmarkClientBase::$BASE_URL = 'https://api.hermaily.com';$client = new PostmarkClient(getenv('HERMAILY_API_KEY'));$client->sendEmail(
    'hello@acme.example',
    'lucia@example.com',
    'Your order is on its way',
    '<p>Hi Lucía, your order has shipped.</p>'
);

Python · postmark-python

Python · before
import os
import postmark.sync

with postmark.sync.ServerClient(os.environ["POSTMARK_SERVER_TOKEN"]) as client:
    client.outbound.send({
        "sender": "hello@acme.example",
        "to": "lucia@example.com",
        "subject": "Your order is on its way",
        "html_body": "<p>Hi Lucía, your order has shipped.</p>",
    })
Python · after
import os
import postmark.sync

with postmark.sync.ServerClient(os.environ["HERMAILY_API_KEY"], base_url="https://api.hermaily.com") as client:    client.outbound.send({
        "sender": "hello@acme.example",
        "to": "lucia@example.com",
        "subject": "Your order is on its way",
        "html_body": "<p>Hi Lucía, your order has shipped.</p>",
    })

Over SMTP

If you send over SMTP (a CMS, an ERP, an application that does not speak HTTP), the change is even shorter:

PostmarkHermaily
Hostsmtp.postmarkapp.comsmtp.hermaily.com
PortWhichever you use587 (STARTTLS) or 465 (TLS)
Usernameyour Server Tokenapikey (any value works)
PasswordYour Postmark keyYour Hermaily API key

For the broadcast stream, add the header X-Hermaily-Stream: broadcast. More details in the SMTP documentation.

Equivalents

POST /email POST /email/batch

The base URL goes from https://api.postmarkapp.com to https://api.hermaily.com. Unrecognized fields are ignored without an error, so also check what is not supported.

PostmarkIn Hermaily
X-Postmark-Server-TokenYour Hermaily API key (X-Postmark-Account-Token works too).
From, To, Cc, Bcc, ReplyTo, SubjectSame.
HtmlBody, TextBodyHTML and text bodies.
Tag, Metadata, HeadersTag, metadata and headers.
AttachmentsSame, including ContentID to embed.
TrackOpens, TrackLinksOpens; clicks with any value other than None.
MessageStreamoutbound (or none) is transactional; a name containing broadcast, broadcast. Without it, the X-PM-Message-Stream header in Headers is read instead.
ResponsePostmark's (MessageID, SubmittedAt, ErrorCode…). A message whose recipients are all suppressed answers 422 with ErrorCode: 406, like inactive recipients.

Webhook events

With the webhook in Postmark format, each Hermaily event arrives with the name Postmark uses:

HermailyWhat happenedPostmark format
sendLeft for the recipient's serverNot sent
deliveryDeliveredDelivery
delivery_delayTemporary delayNot sent
bounceBouncePermanent: Bounce (HardBounce); temporary: Bounce (SoftBounce)
complaintSpam complaintSpamComplaint
rejectRejected before sendingBounce (HardBounce)
rendering_failureRendering failureNot sent
openOpenOpen
clickClickClick
unsubscribeUnsubscribeSubscriptionChange

Postmark does not sign its webhooks (it protects the URL with a username and password). In Postmark format, Hermaily sends the same body with RecordType and adds X-Hermaily-Signature (HMAC-SHA256, how to verify it): we recommend checking it. If your receiver relies on a username and password in the URL, try it first with the webhook's Test button in the dashboard.

The full reference, with every field, is in the documentation: migrating from Postmark.

What is not supported

Hermaily emulates Postmark's sending, not its whole API. This is what you will not find:

  • Templates (/email/withTemplate, /email/batchWithTemplates): they do not exist. Send the finished HTML.
  • The rest of Postmark's API (bounces, stats, messages, streams, servers, sender signatures, inbound): it does not exist here. Suppressions, stats and each message's history are in the dashboard.
  • The send, delivery_delay and rendering_failure events have no equivalent in Postmark format and are not sent (see the table above).
  • A batch takes up to 500 messages per request.

What it costs compared with Postmark

Monthly cost of both services at the most common volumes:

Monthly cost before tax: Hermaily and Postmark
Emails a monthHermailyPlan HermailyPostmark
10,000$6 (€5)Starter$15
50,000$19.50 (€17)Growth$55
100,000$33.50 (€29)Business$115
250,000$79 (€69)Pro$245

Prices before tax. Hermaily: the cheapest plan that covers the volume, counting overage, with messages of up to 50 kB on average. Postmark: prices checked on 26 November 2026 on its pricing page, cheapest monthly plan with no annual commitment that covers the volume. More providers and volumes in Pricing.

Not sure yet whether to switch? See Hermaily as a Postmark alternative: why people switch and when Postmark is still the better choice.

Frequently asked questions

Do I have to change my code to migrate from Postmark?

No. Keep Postmark's library and change only the API (or SMTP) host and the token. Requests, responses and error codes have Postmark's shape.

Do my Postmark webhooks keep working?

Yes, if you create the webhook in Postmark format: the same RecordType values arrive (Delivery, Bounce, SpamComplaint, Open, Click, SubscriptionChange). They also carry X-Hermaily-Signature so you can verify them.

What about my Postmark templates?

Hermaily has no templates in the API: /email/withTemplate does not exist. Build the HTML in your application before sending it.

Do Message Streams work?

Yes, to choose between transactional and broadcasts: outbound (or none) is transactional, and a name containing broadcast goes through the broadcast stream, with one-click unsubscribe.

Can I use SMTP instead of the API?

Yes. Replace smtp.postmarkapp.com with smtp.hermaily.com (port 587 with STARTTLS or 465 with TLS) and use your Hermaily key as the password (the username can be apikey or the key itself). The X-PM-Message-Stream header works over SMTP too.

Can I migrate gradually?

Yes. Since the code is the same, you can send part of your traffic through Hermaily and the rest through Postmark until you are confident.

Try Hermaily with your Postmark code

Create the account, verify your domain and send your first email with the library you already have. The Free plan includes 300 emails a month.

Create a free account