Postmark PHP

Officially supported PHP client for sending and receiving email through Postmark

SDK
Composer
vv7.0.0
177stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
60/100Good
Development Activity48
Maintenance32
Community80
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
57/100Fair
Architecture62
Code Quality60
Innovation42
Learning Curve65

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

  • PostmarkClient for sending emails (including batch and templated sends) and reading bounces/stats/delivery status
  • PostmarkAdminClient for account-level operations like managing servers, sender signatures, and domains
  • Typed model classes under src/Postmark/Models for 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.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search