Skip to content

Emails 0.1.13: AWS SNS notifications reach the webhook again

Emails 0.1.13 fixes the AWS SES webhook, which refused every notification that SNS sent.

The /webhooks/ses route ran through the host app’s :browser pipeline, which checks for a CSRF token. SNS posts its notifications without a session or token, so each one was rejected with a 403 before the module saw it, and bounces, complaints and deliveries reported by SNS were never recorded. The route now has its own minimal pipeline without session or CSRF checks, and SNS notifications arrive again. Sites that collect SES events by SQS polling instead were not affected.

Full release notes: Emails 0.1.13

0.1.13 · 19 July 2026

Fixed

  • The /webhooks/ses route was piped through the host app’s :browser pipeline, which (per the documented default) includes protect_from_forgery. AWS SNS delivers webhook notifications as a cold, session-less POST with no CSRF token, so every notification 403’d with Plug.CSRFProtection.InvalidCSRFTokenError before ever reaching WebhookController. The route now runs through its own minimal :phoenix_kit_emails_webhook pipeline (just plug :accepts, ["html"], no session/CSRF plugs), mirroring the equivalent fix in phoenix_kit_newsletters’s one-click-unsubscribe route. (#17)

Emails 0.1.13. Install or update: {:phoenix_kit_emails, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.