Emails 0.9.0: Spam complaints now block the address, and the SNS webhook works again
Emails 0.9.0 fixes how the PhoenixKit email module reacts to complaints and bounces: an address that marked your mail as spam is no longer mailed again, and every way the providers report back now reaches the blocklist.
Spam complaints block the address
A spam complaint now adds the recipient to the blocklist with the reason complaint, the same way a hard bounce does. Until now SES complaints and Brevo spam events were recorded, but the address stayed mailable. A “not spam” report does not block.
The SNS webhook works again
If your site receives Amazon SES events through SNS, posted to its webhook rather than read from SQS, this release matters most. SES names its event types with a capital letter (Bounce, Delivery), and the webhook only matched lowercase ones, so every real event was refused as unknown. Events are recorded again, and hard bounces and complaints that arrive this way now reach the blocklist too, as they already did over SQS and Brevo.
Unblocking sticks
Removing an address from the blocklist now holds. A replayed bounce or complaint, such as a redelivered SQS message, a Brevo re-poll or “sync status” on the email, used to put the address back and overwrite the entry’s reason and expiry. An event already recorded for an email no longer touches the blocklist.
Also fixed: SQSProcessor.process_email_event/1 returns an error instead of raising when the module is off or an event has no message id, and the module reports its real version.
Upgrading
Emails 0.9 needs PhoenixKit 3.5.0 or later; there is no migration. The fallbacks for cores without PhoenixKit.Email.Layout are gone, so mix phoenix_kit_emails.templates.export --html auto always exports the body, and TemplateExport.Body.local_document?/1 is removed.
Full release notes: Emails 0.9.0
0.9.0 · 14 November 2026
Needs PhoenixKit 3.5.0. No migration.
Fixed
- Spam complaints now add the recipient to the blocklist, with reason
complaint, the same way hard bounces do. SES complaints and Brevospamevents were recorded but the address stayed mailable. Anot-spamreport does not block. - The SNS webhook blocklists too. Hard bounces and complaints arriving over the HTTP webhook (
Emails.process_webhook_event/1) never reached the blocklist; only the SQS and Brevo paths did. - The SNS webhook records SES events again. SES publishes event types capitalized (
Bounce,Delivery,DeliveryDelay); the webhook parser matched only lowercase, so every real event was refused asunknown. - Removing an address from the blocklist sticks. A replayed bounce or complaint (a redelivered SQS message, a Brevo re-poll, “sync status” on the email) put the address back and overwrote the entry’s reason and expiry. An event already recorded for the email no longer touches the blocklist.
SQSProcessor.process_email_event/1no longer raisesCaseClauseErrorwhen the module is off or the event has no message id. It returns{:error, :system_disabled}(nothing is recorded or blocklisted) or{:error, :invalid_message_id}.PhoenixKit.Modules.Emails.version/0returns the package version. It returned"0.1.0"whatever was installed.
Changed
- Core pin is
>= 3.5.0 and < 4.0.0(was>= 3.0.0). The fallbacks for cores withoutPhoenixKit.Email.Layoutare gone:mix phoenix_kit_emails.templates.export --html autois alwaysbody, andTemplateExport.Body.local_document?/1is removed. - Dependency updates.
Emails 0.9.0. Install or update: {:phoenix_kit_emails, "~> 0.9"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.