Emails 0.6.0: Address verification, template sources in the log and an SES switch
Emails 0.6.0 adds address verification to the PhoenixKit email module: it checks whether an address can receive mail without sending anything. The email log now says which template built a message, and one switch stops all Amazon SES event processing.
Address verification
The module can now check addresses before anyone writes to them. It cleans up the address, checks its syntax, compares it with lists of disposable, free and role addresses and known top-level domains, and looks up the domain’s mail servers, with a cache per domain. Each address keeps one stored verdict. Lists are checked in the background on a new email_verification queue. This is a service for other modules and code; the admin gets only its settings.
An optional mailbox check asks the receiving mail server whether the mailbox exists, without ever sending a message. It is off by default and set up in a new Mailbox verification (SMTP) section on the Email Sending settings page, under Mailbox check:
- Off: only the domain is checked.
- Runner on your computer: the site’s server never connects to port 25. A PowerShell script, downloaded from the settings page, runs on your own machine with a machine-API key, takes the queued addresses and reports the answers.
- This server: the site’s own server runs the checks after you confirm. It connects only to public IPv4 addresses it has looked up itself, so a mail record pointing at
localhostor a private address cannot make it reach into its own network. The page warns not to use this when other sites share the IP address, since a mail host that blocks it blocks them too.
Which template built an email
The email log now records where a message’s template came from: Database template, File override or Default template. The details page shows it as a badge, with Open template while the database row still exists. PhoenixKit’s own sign-in and account emails are linked to the row they used.
One switch for SES events
The Delivery event tracking settings get a Process Amazon SES events switch. Turning it off stops delivery, bounce, complaint, open and click events from Amazon SES, through SQS and the SNS webhook alike, not only SQS polling. Turning it back on leaves the polling switch as it was. All new texts are translated into Estonian and Russian.
Upgrading
Run mix phoenix_kit.update. Migrations V4 and V5 add six verification tables, and V6 adds two empty columns to the email log for the template source.
Add the email_verification queue to your Oban config, for example email_verification: 5. PhoenixKit 2.28.0 and later adds it on install or update; an app set up earlier adds it by hand. Without the queue, verification lists are stored but never run.
The PhoenixKit requirement is unchanged (2.21.3 or later, below 3.0). The runner mode needs PhoenixKit’s machine API, from 2.63.0; on an older core it is unavailable and reads as off. Dependencies were refreshed, including a security update of plug_crypto to 2.2.1.
Full release notes: Emails 0.6.0
0.6.0 · 24 October 2026
Upgrade notes
- Run
mix phoenix_kit.update: migrations V4 and V5 add the address verification tables (phoenix_kit_email_verifications,phoenix_kit_email_verify_domains,phoenix_kit_email_verify_batches,phoenix_kit_email_verify_batch_items,phoenix_kit_email_verify_smtp_queue,phoenix_kit_email_verify_runners), and V6 adds two nullable columns,template_uuidandtemplate_source, tophoenix_kit_email_logs. - Declare the Oban queue
email_verification(e.g.email_verification: 5). Core 2.28.0 and later writes it into the host’s Oban config on install/update; an app set up earlier adds it by hand. Without it, verification batches are stored and never run;Verification.queue_configured?/0tells whether it is there. - The
phoenix_kitrequirement is unchanged (>= 2.21.3 and < 3.0.0). The SMTP runner mode needs core’s machine API (core 2.63.0 and later); on an older core it is unavailable and reads asoff.
Added
- Address verification (PR #58).
PhoenixKit.Modules.Emails.Verificationchecks whether addresses are deliverable without sending anything: normalisation, syntax, word lists (disposable, TLD, free, role), DNS MX with a per-domain cache, and one stored verdict per address (verify/2,results_for/1,statuses_for/1,summary/1).start_batch/4verifies a list in the background on theemail_verificationqueue, with progress on PubSub. - Optional mailbox (SMTP) check, off by default
(
email_verify_smtp_mode), set up under a new “Mailbox verification (SMTP)” section on the Email Sending settings page. In moderunnerthe server never connects to port 25: a PowerShell runner on the operator’s machine (downloadable from/admin/emails/verification/pk-smtp-runner.ps1, seedocs/smtp-runner.md) authenticates with a machine-API key (scopeemails.smtp_runner:run), claims the queued addresses and reports the replies. In modelocalthe site’s own server runs the same queue after a confirmation.DATAis never sent. In modelocalthe server connects only to a public IPv4 address it has resolved itself, so an MX record naminglocalhostor a private address cannot make it dial its own network. - The email log records which template layer built a message (PR #60):
template_source("db","file"or"module";nilwhen no template built it) and, for a database row,template_uuid. The email details page shows it as a badge, linking to the template while the row exists. Core’s authentication mails are attributed to the row they used, and a test send from the editor counts as"db"only while the form matches the saved template. - “Process Amazon SES events” switch in the Delivery event tracking settings section: a reachable way to stop all SES processing, not just SQS polling. Re-enabling it leaves the polling switch as it was.
- Translations for all new strings in en, et and ru.
Changed
- Dependencies refreshed to
phoenix_kit2.64.1, includingplug_crypto2.2.1 (security patch for CVE-2026-105963).
Fixed
- The webhook controller’s moduledoc named a route and controller that do not
exist; it now documents the
/webhooks/sesrouteWeb.Routesregisters. TheWeb.EmailTrackingmoduledoc no longer claims a mount path.
Emails 0.6.0. Install or update: {:phoenix_kit_emails, "~> 0.6"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.