Postmark PHP
Officially supported PHP client for sending and receiving email through Postmark
Repository Health
Technical Analysis
Postmark PHP is the officially supported client for Postmark’s transactional email API, wrapping message sending, bounce and delivery-stats handling, templates, and inbound email processing behind two client classes: PostmarkClient for regular sending/server operations and PostmarkAdminClient for account-level administration (server and domain management). It’s built on Guzzle for HTTP transport and returns typed model objects for responses like message details, bounces, and stats.
The library backs PHP applications that use Postmark for transactional (not bulk marketing) email, including the two-way flow of both sending outbound messages and processing inbound email via Postmark’s inbound webhook payloads.
What You Get
PostmarkClientfor sending emails (including batch and templated sends) and reading bounces/stats/delivery statusPostmarkAdminClientfor account-level operations like managing servers, sender signatures, and domains- Typed model classes under
src/Postmark/Modelsfor API responses (message details, bounces, stats) - Support for processing Postmark’s inbound email webhook payloads
- Guzzle-based HTTP transport with PSR-friendly request/response handling
Common Use Cases
- Sending transactional emails (receipts, password resets, notifications) from a PHP application
- Sending templated batch emails using Postmark’s template API
- Processing inbound email that Postmark forwards via webhook into the application
- Monitoring bounces and delivery stats to maintain sender reputation
- Managing Postmark servers and sender domains programmatically via the admin client
Under The Hood
Architecture - The library is split into two thin client classes atop a shared PostmarkClientBase (handling Guzzle requests, auth headers, and error mapping): PostmarkClient for message/server-scoped operations and PostmarkAdminClient for account-wide admin actions, with typed response models under src/Postmark/Models decoding JSON API responses into PHP objects. Tech Stack - PHP 8.1-8.4 with Guzzle 7.8 as the sole HTTP dependency, PSR-0 autoloading (an older convention retained for backward compatibility), and dev tooling via PHPUnit 10, PHPStan, and PHP-CS-Fixer, with CircleCI running the test suite. Code Quality - 19 test files cover the client classes; the repo has seen reduced commit activity recently (last commit January 2026) following the transfer from Wildbit to ActiveCampaign after the 2022 acquisition, though the package name (wildbit/postmark-php) remains unchanged on Packagist. API Design - A two-client split (regular vs. admin) keeps the common sending API small while isolating rarer account-management calls, and Guzzle-based transport is a familiar dependency for most PHP projects; documentation for methods lives primarily in the project’s GitHub wiki rather than inline in the README, so first-time integration often means a detour to the wiki alongside the composer install.
Used by 2 apps in this directory
BillaBear
Ecommerce · Invoicing Finance
Self-hostable subscription management and billing platform with Stripe integration, tax automation, configurable workflows, and Twig-based document generation.
Invoice Ninja
Invoicing Finance · Project Management
Self-hostable invoicing, time-tracking, and multi-gateway payment platform for freelancers and small businesses, with built-in e-invoicing compliance for EU and global standards.