symfony/postmark-mailer
Postmark integration for Symfony Mailer, supporting both SMTP and API transports via simple DSN configuration using your Postmark Server Token. Configure with postmark+smtp://ID@default or postmark+api://KEY@default.
Mailable pipeline; async sends and retries come from Laravel's queue workers.Email object model.bug #65674) makes Postmark webhook authentication use the configured secret rather than trusting source IPs. This shifts the integration from network-trust to cryptographic-trust, which materially improves the architecture fit for inbound-parsing and event-webhook workflows that were previously the weakest security link in the design.postmark+api://, postmark+smtp://) keeps Laravel-specific code to a thin transport binding plus an env-driven DSN.Mailable must be mapped to Symfony's Email and handed to the Postmark transport. Mitigations: a custom transport class registered via Mail::extend(), or an HTTP microservice if coupling is unacceptable..env, rotation runbook, per-environment values.)composer require symfony/postmark-mailer symfony/mailer — dependency only, no full Symfony app.MAIL_MAILER=postmark and a DSN.services.postmark.webhook_secret) and reference it in the webhook controller/middleware.POST /send-email. Reduces coupling, adds latency and an extra failure domain. Usually unjustified for a single-app Laravel codebase.Mailable rendering work; older versions need a pinned transport.composer require symfony/mailer symfony/postmark-mailer (pin ^8.1).Mail::extend('postmark', ...); read the DSN from config.MAIL_MAILER=postmark and MAILER_DSN=postmark+api://KEY@default per environment.^8.1, treat the transport binding as an internal package with its own tests, and add secret rotation to the standard runbook.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Postmark API/SMTP outage | Delayed or failed sends | Laravel queue retries + backoff; dead-letter queue; secondary transport fallback |
| Invalid/expired server token | All sends fail (auth error) | Config validation at boot; alert on sustained auth failures |
| Webhook secret missing or mismatched (8.1.6) | Legit webhooks rejected (401); inbound parsing and event ingestion silently stop | Provision secret per environment; alert on 401 rate; signed-payload integration test; rotation runbook |
| Webhook secret leaked | Spoofed events accepted | Store in secrets manager, rotate on exposure, restrict endpoint, validate payload schema |
| Malformed/oversized payload | Send or webhook rejected | Package fallback handling; validate size before processing; log and dead-letter |
| Rate limiting / throttling | Throughput reduction | Queue-backed throttling; batch sends; monitor Postmark rate headers |
| Bounce/complaint spikes | Reputation damage, blocked sends | Consume bounce/complaint webhooks; suppress at app layer; monitor stream reputation |
| Transport API change on upgrade | Send path breaks | Pinned version, staging upgrade rehearsal, transport-level tests |
Email/Transport semantics (small learning curve); webhook signature verification (small, but security-critical).How can I help you explore Laravel packages today?