PHPackages                             netglue/zf-postmark - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. netglue/zf-postmark

AbandonedArchivedModule

netglue/zf-postmark
===================

Zend Framework Module to receive Webhooks sent by Postmark

1.0.1(7y ago)01.4k↓100%MITPHPPHP &gt;=7.1

Since Aug 15Pushed 7y agoCompare

[ Source](https://github.com/netglue/ZF-Postmark)[ Packagist](https://packagist.org/packages/netglue/zf-postmark)[ RSS](/packages/netglue-zf-postmark/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (3)Used By (0)

Zend Framework Module: Postmark Inbound &amp; Events Webhook
============================================================

[](#zend-framework-module-postmark-inbound--events-webhook)

[![Latest Stable Version](https://camo.githubusercontent.com/392753a92068f91d55b4280538c31cbc845e2b70c5bad57892160e8e0f03f0dc/68747470733a2f2f706f7365722e707567782e6f72672f6e6574676c75652f7a662d706f73746d61726b2f76657273696f6e)](https://packagist.org/packages/netglue/zf-postmark)[![Coverage Status](https://camo.githubusercontent.com/fede3856aacb91d17310479634574408f2984f74370b1f976af3679d7b32904e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6e6574676c75652f5a462d506f73746d61726b2f62616467652e737667)](https://coveralls.io/github/netglue/ZF-Postmark)[![Build Status](https://camo.githubusercontent.com/7f2169878fc991c1253787b4fb347fbe35d5ac9f9dc1baa003ea6ad5d074844e/68747470733a2f2f7472617669732d63692e6f72672f6e6574676c75652f5a462d506f73746d61726b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/netglue/ZF-Postmark)[![Maintainability](https://camo.githubusercontent.com/c007dc5053ea54116a73165f6b3fca3ada2c2430a2d3e10f4ee36187c587965f/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f39613932636338333934366332303533393665382f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/netglue/ZF-Postmark/maintainability)[![Test Coverage](https://camo.githubusercontent.com/ca86d6f75d9a1468a85d61b7e63aabe5badc278bf9f2609d97627373e4c788ae/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f39613932636338333934366332303533393665382f746573745f636f766572616765)](https://codeclimate.com/github/netglue/ZF-Postmark/test_coverage)

Purpose
-------

[](#purpose)

This module/package can be added to a ZF3 application in order to easily process webhooks sent by [Postmark](https://postmarkapp.com) such as delivery, click, open and bounce events. It can also be used to process inbound email messages.

It hasn’t been tested on a ZF2 app, so YMMV. Probably the dependencies are too recent for it to work but it wouldn't be difficult to port for ZF2.

Install
-------

[](#install)

Install with composer using `"netglue/zf-postmark"`, enable the module in your `application.config.php` using the module name `'NetgluePostmark'` and add custom configuration to change the route url perhaps or set up Basic HTTP Auth *(Recommended)*.

Zend's component installer should inject the module name automatically for you during composer installation.

Configure Basic Auth
--------------------

[](#configure-basic-auth)

In order to mitigate random post requests to your inbound or event webhook endpoint, you should configure basic auth, so create a local config file based on the contents of `config/postmark.local.php.dist` and configure to suit.

Given a username and password of `postmark` and `Pa55w0rd`, by default, your webhook url would be `https://postmark:Pa55w0rd@my-domain.com/postmark-outbound-webhook`

Setup Webhooks at your Postmark account
---------------------------------------

[](#setup-webhooks-at-your-postmark-account)

Assuming you've used the default routes, and enabled basic auth, your endpoints will be:

`https://username:password@your-domain.com/postmark-outbound-webhook` for bounces, clicks, deliveries etc and `https://username:password@your-domain.com/postmark-inbound-webhook` for inbound email messages.

Go to [your account on Postmark](https://account.postmarkapp.com/servers) and select the server you want to configure, click settings and enter the correct URL for either the inbound or outbound webhooks and optionally provide the basic auth credentials if you have configured them.

The outbound webhook accepts Delivery, Bounce, Spam Complaint, Open and Click events whereas the inbound webhook only accepts inbound email events/messages.

Listening for events
--------------------

[](#listening-for-events)

The controller triggers consistent events that you can listen for using Zend's Event Manager package. Bounces are subdivided into hard bounces and soft bounces, so, you may choose to log soft bounces and react in a different way to a hard bounce. All of the event names are listed as constants in `\NetgluePostmark\EventManager\AbstractEvent` and are:

```
const EVENT_HARD_BOUNCE    = 'postmark.event.hard_bounce';
const EVENT_SOFT_BOUNCE    = 'postmark.event.soft_bounce';
const EVENT_BOUNCE_OTHER   = 'postmark.event.bounce_other';
const EVENT_OPEN           = 'postmark.event.open';
const EVENT_CLICK          = 'postmark.event.click';
const EVENT_DELIVERY       = 'postmark.event.delivery';
const EVENT_SPAM_COMPLAINT = 'postmark.event.spam_complaint';
const EVENT_INBOUND        = 'postmark.event.inbound';
```

### Example Logging Listener

[](#example-logging-listener)

There is an example, aggregate listener in `\NetgluePostmark\Listener\LoggingListener` that you can attach by reading the comments in the dist config file `config/postmark.local.php.dist`.

Events are triggered by `\NetgluePostmark\Service\EventEmitter` - Using a delegator factory targeting that is the easiest way of subscribing to events as your listeners will only be retrieved from the container if a post is made to the webhook.

For docs on writing listeners, refer to the [Zend Event Manager Docs](https://docs.zendframework.com/zend-eventmanager/).

Test
----

[](#test)

`cd` to wherever the module is installed, issue a `composer install` followed by a `composer test`.

Contributions
-------------

[](#contributions)

PR's are welcomed. Please write tests for new features.

Support
-------

[](#support)

You're welcome to file issues, but please understand that finding the time to answer support requests is very limited so there might be a long wait for an answer.

About
-----

[](#about)

[Netglue makes websites and apps in Devon, England](https://netglue.uk). We hope this is useful to you and we’d appreciate feedback either way :)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Total

2

Last Release

2808d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6c21b0de8cc9938916a186f5f2ed0bee90a4e23e0b29cf7b9c18bfe99067f9b?d=identicon)[netglue](/maintainers/netglue)

---

Top Contributors

[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (15 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/netglue-zf-postmark/health.svg)

```
[![Health](https://phpackages.com/badges/netglue-zf-postmark/health.svg)](https://phpackages.com/packages/netglue-zf-postmark)
```

###  Alternatives

[zf-commons/zfc-user

A generic user registration and authentication module for ZF2. Supports Zend\\Db and Doctrine2.

4851.1M70](/packages/zf-commons-zfc-user)[socalnick/scn-social-auth

Uses the HybridAuth PHP library to Enable authentication via Google, Facebook, Twitter, Yahoo!, etc for the ZfcUser ZF2 module.

21974.2k3](/packages/socalnick-scn-social-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
