Skip to content

Postmaster 2.0

Choose a tag to compare

@jszobody jszobody released this 23 May 18:48
· 81 commits to master since this release
65ff858

Postmaster 2.0 — provider-agnostic email webhooks and delivery tracking for Laravel.

use STS\Postmaster\EmailEvent;

Event::listen(function (EmailEvent $event) {
    if ($event->isBounced()) {
        // the address bounced; act on it
    }
});

Send mail through SendGrid, Postmark, Mailgun, Amazon SES, or Resend; every provider's webhook arrives as the same normalized event. Switch providers, run several at once, or fail over between them without touching that code.

What's in the box

  • One event for every provider. Every webhook arrives as the same EmailEvent, no matter which of the five providers sent it.
  • Verified by default. Every inbound webhook is authenticated by signature, token, basic auth, or a custom authorizer; anything Postmaster can't trust is rejected.
  • Delivery tracking out of the box. Run the migrations and every send is recorded, kept current from the webhook stream, and queryable via delivered(), bounced(), failed() scopes plus a full per-message timeline.
  • Emails linked to your models. Tie a send to an Order (what it's about) and a User (who it's for) via the Tracking DTO and read its state straight off either model.
  • Self-maintaining suppression list. Hard bounces, complaints, and drops feed an EmailAddress table automatically. Opt in to POSTMASTER_BLOCK_SUPPRESSED=true and the package refuses to send to known-bad addresses at the source.
  • A support dashboard. Gated, cross-tenant UI for searching messages, watching events arrive live, replaying a stored message, and walking from any email to the person it was sent to.
  • Sandbox delivery. POSTMASTER_DELIVERY=sandbox intercepts every outbound mail in staging — recorded but never actually sent.
  • postmaster:verify. Round-trip setup check that sends a real test email and watches live for the webhook to come back.

Requirements

  • PHP 8.2+
  • Laravel 12 or 13

Install

composer require stechstudio/laravel-postmaster
php artisan vendor:publish --tag=postmaster.migrations
php artisan migrate

Full documentation: README.