npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ghost-email-postmark

v1.0.12

Published

Postmark email provider adapter for Ghost with batch email support

Readme

ghost-email-postmark

Postmark email provider adapter for Ghost with batch email support.

Features

  • Batch Email Sending: Send up to 500 emails per batch using Postmark's batch API
  • Email Analytics: Fetch email events for delivery, opens, clicks, bounces, and spam complaints
  • Ghost Integration: Seamlessly integrates with Ghost's email adapter pattern
  • Personalization: Full support for Ghost's replacement variables (merge tags)
  • Zero Ghost Footprint: No Postmark code in Ghost core - loaded dynamically from npm

Installation

Option 1: Install from npm (when published)

cd ghost/core
npm install ghost-email-postmark

Option 2: Install locally (for development)

cd ghost/core
npm install /path/to/ghost-email-postmark

Option 3: Link for development

cd /path/to/ghost-email-postmark
npm link

cd /path/to/ghost/ghost/core
npm link ghost-email-postmark

Configuration

Ghost will automatically load the adapter from node_modules when configured.

1. Update Ghost config

Add to your config.[env].json:

{
  "bulkEmail": {
    "provider": "ghost-email-postmark",
    "postmark": {
      "serverToken": "your-postmark-server-token",
      "messageStream": "outbound",
      "apiUrl": "https://api.postmarkapp.com"
    },
    "batchSize": 500,
    "targetDeliveryWindow": 3600
  }
}

2. Restart Ghost

Ghost will automatically:

  1. Detect ghost-email-postmark as the provider
  2. Load the adapter from node_modules/ghost-email-postmark
  3. Validate it implements the required methods
  4. Use it for email sending and analytics

That's it! No code changes needed in Ghost.

How It Works

Dynamic Loading

Ghost's adapter manager automatically:

  1. Checks node_modules for the adapter package
  2. Loads the adapter class
  3. Validates it has requiredFns property
  4. Validates all required methods are implemented
  5. Instantiates the adapter with Ghost config

Adapter Interface

The adapter implements Ghost's email provider interface:

class PostmarkAdapter {
    static requiredFns = ['send', 'getMaximumRecipients', 'getTargetDeliveryWindow', 'fetchLatest'];

    async send(data, options) { }
    getMaximumRecipients() { }
    getTargetDeliveryWindow() { }
    async fetchLatest(batchHandler, options) { }
}

Configuration Options

Required

  • serverToken: Your Postmark Server API token

Optional

  • messageStream: Message stream to use (default: "outbound")
  • apiUrl: Postmark API URL (default: "https://api.postmarkapp.com")
  • batchSize: Maximum recipients per batch (default: 500)
  • targetDeliveryWindow: Delivery window in seconds for rate limiting (default: 0)

Email Sending

Batch API

The adapter uses Postmark's batch email API:

  1. Applies replacements individually per recipient
  2. Uses batch endpoint (/email/batch) for multiple recipients
  3. Uses single email endpoint (/email) for one recipient
  4. Returns message ID

Features:

  • Up to 500 recipients per batch
  • Individual personalization per recipient
  • Open and click tracking
  • Metadata for analytics

Email Analytics

Event Fetching

  1. Fetches messages from Postmark Messages API (500 per page)
  2. Gets detailed events for each message
  3. Normalizes events to Ghost format
  4. Processes events in batches

Event Type Mapping

| Postmark Event | Ghost Event | Description | |----------------|-------------|-------------| | Delivered | delivered | Successfully delivered | | Bounced | failed | Delivery failed (bounce) | | Opened | opened | Email opened | | LinkClicked | clicked | Link clicked | | SpamComplaint | complained | Marked as spam | | SubscriptionChange | unsubscribed | Unsubscribed |

Development

Testing Locally

  1. Link the package:

    cd /path/to/ghost-email-postmark
    npm link
  2. Link in Ghost:

    cd /path/to/ghost/ghost/core
    npm link ghost-email-postmark
  3. Configure Ghost:

    {
      "bulkEmail": {
        "provider": "ghost-email-postmark",
        "postmark": {
          "serverToken": "your-test-token"
        }
      }
    }
  4. Start Ghost and test

Publishing

cd /path/to/ghost-email-postmark
npm publish

License

MIT

Support

For issues specific to this adapter:

  • GitHub Issues: https://github.com/madewithlove/ghost-email-postmark/issues

For Postmark API issues:

  • Postmark Support: https://postmarkapp.com/support

For Ghost integration issues:

  • Ghost Documentation: https://ghost.org/docs/