Skip to main content

Postmark

Postmark is a sending service you reach with a server token. It works on Node, Docker and Cloudflare Workers. Use this page if you chose EMAIL_PROVIDER=postmark.

Settings​

VariableRequiredWhat it does
EMAIL_PROVIDERyesSet to postmark.
EMAIL_FROMyesThe sender, as Harmony Community Choir <noreply@example.org>. Postmark needs a verified sender signature or domain for it.
POSTMARK_SERVER_TOKENyesThe server token from your Postmark server. Without it the server refuses to start with "EMAIL_PROVIDER=postmark needs POSTMARK_SERVER_TOKEN".
EMAIL_REPLY_TOnoWhere replies go.

The message stream​

Every message goes out on Postmark's outbound message stream (the outbound stream, called "Default Transactional Stream" in Postmark). The site does not let you choose another. This matters because announcements and mailings go through it too: Postmark is strict about what the transactional stream carries, and may question a large announcement. If you plan to email many members, send announcements through a different service, as described in Send announcements through a different service.

A working example​

EMAIL_PROVIDER=postmark
EMAIL_FROM="Harmony Community Choir <noreply@example.org>"
POSTMARK_SERVER_TOKEN=replace-with-your-server-token

On Cloudflare, keep EMAIL_PROVIDER and EMAIL_FROM under [vars] in wrangler.toml and set the token with wrangler secret put POSTMARK_SERVER_TOKEN.

If something goes wrong​

When Postmark refuses a message, the server log has its status and reason, and the message counts as not sent:

Postmark rejected the email: 422 Unprocessable Entity: {"ErrorCode":400,"Message":"Sender signature not found ..."}

That means EMAIL_FROM is not a verified sender. A 401 means the token is wrong. See Troubleshooting: nobody can log in, or emails do not arrive.