Email platforms

Postmark email validation integration

A module you copy into your own server checks the To, Cc and Bcc of each Postmark message before it is sent and sends it without the addresses that cannot receive mail. Everything else in the message goes to Postmark as you wrote it.

Read the full setup guideGet an API key

  • Setup guide
  • A module you download

Instead of POST /emailTypeScript or JavaScript

Your server
import { createPostmarkGuard } from './email-validation-postmark.mjs'; // .ts under Node 22.18+, Deno or Bun

const guard = createPostmarkGuard({ apiKey: process.env.EV_API_KEY, postmark: { serverToken: process.env.POSTMARK_SERVER_TOKEN } });
const { submitted, precheck } = await guard.sendEmail(message);

At a glance.

Status
Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
For
Developers who send transactional mail with Postmark and want sign-up, receipt and password mail kept away from addresses that would bounce and hurt their sending reputation.
You need
An API key of ours with Validate addresses (on by default) and your Postmark server’s API token, in a server with fetch: Node 22 or later, Bun, Deno or Cloudflare Workers.
Costs
1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses, test addresses on sandbox.email-validation.org, addresses on reserved domains such as example.com and, in a bulk list, repeats of an address (charged once).
Full guide
Read the full setup guide

Typical uses.

  • Before each send

    sendEmail, sendEmailWithTemplate and the two batch calls check every distinct address once and send the message without the blocked entries; a message whose every To is blocked is held, not sent.

  • With your own Postmark client

    precheckMessage does the check alone and answers the message to send, or null when it is held; check does one address, for a sign-up form.

  • Suppress on the stream, if you ask

    Off by default. With suppress on, a recipient blocked as a definite invalid is also added to its message stream’s suppression list, so Postmark refuses it there from then on.

Set it up. 4 steps.

The short version of the full setup guide, which stays the reference when a step does not match what you see.

Read the full setup guide

  1. Download and unzip

    It is not on a registry: download email-validation-postmark.zip from the guide. It holds the module as TypeScript and as JavaScript, and the licence.

  2. Copy the module

    Put email-validation-postmark.ts (or .mjs) into your server’s code and make the guard once per process.

  3. Try it without sending

    Check no_mailbox@sandbox.email-validation.org with precheckMessage and log the answer: the message is held, its recipient blocked as invalid. Never send to that address through Postmark.

  4. Send through the guard

    Call guard.sendEmail where you called Postmark’s POST /email, or send precheck.message with your own client.

Good to know.

  • By default only a definite invalid is taken out; block can add disposable addresses. Every other address, and every address that got no answer, is sent.

  • It fails open: no key, a timeout, a network error or any error answer keeps the recipient, so a problem on our side never stops your mail. Nothing is retried.

  • Each check uses one credit; a verdict the guard remembers costs nothing, and unknown results, malformed and sandbox addresses are free.

  • Postmark’s SMTP sending is not covered: check recipients with guard.check before you hand a message to SMTP.

Connect Postmark.

Test it on our sandbox addresses for free, then on your own contacts.

Create your accountRead the full setup guide

Updated · Maintained by: Email Validation LLC