Skip to content

Emails 0.5.1: Archive system templates, and working clone and SES links

Emails 0.5.1 lets you archive a system email template from the Templates list, so the email falls back to its file or built-in version, and fixes cloning templates and the Integrations links in the SES settings.

Archive System Template and Activate System Template ask for confirmation and say what will happen: archived, the email uses a file override if there is one, or the sending module’s built-in text. System templates still cannot be deleted, and their status is locked in the editor. A failed archive, activate or clone now shows the real reason.

A new template can no longer take one of the 13 names PhoenixKit and billing use for their own emails; such a copy used to override the real email without being marked as a system template. The clone dialog flags a reserved name as you type. Existing templates with such a name are left alone.

Fixed: cloning a template from the admin always failed, and the two Settings → Integrations links in the Amazon SES settings led to a page that reloaded in a loop.

Upgrading

Emails 0.5.1 needs PhoenixKit 2.21.3 or later.

Full release notes: Emails 0.5.1

0.5.1 · 24 September 2026

Added

  • System templates can be archived and reactivated from the Templates list (PR #40). Both go through a confirmation modal that says what the email falls back to (a file override or the sending module’s built-in text; for test_email, the built-in HTML template). Delete stays blocked for system rows. The template editor locks a system row’s Status select, enforced server-side too.
  • Archive, activate and clone failures now flash the actual changeset reason instead of a generic message.

Changed

  • Reserved template names. Template.reserved_names/0 lists the 13 names core and phoenix_kit_billing resolve by exact string. A non-system template can no longer be created, cloned or renamed into one of them — such a row silently overrode the real email while being deletable and unmarked. For the four names this package does not seed (organization_invitation, magic_link_registration, new_login_alert, failed_login_alert) this means no database override at all; customise them with a host override file under priv/phoenix_kit_templates/<name>/ instead. Existing rows under a reserved name are left alone and can still be edited, archived or renamed.
  • Template.changeset/2 no longer casts :is_system from attrs — a crafted LiveView event could otherwise create or promote a protected system row. Only seed_system_templates/0 sets it, via the new Template.changeset/3.
  • The clone modal flags a reserved name inline while typing.
  • The phoenix_kit floor is now >= 2.21.3, the release that renamed the Integrations page the SES / SQS settings links point at. Below it the link resolves to the personal integrations page (core < 2.19.0) or to nothing (2.19.0–2.21.2).

Fixed

  • Cloning a template from the admin UI always failed: the display name typed into the modal was merged back over its own i18n map, failing the :map cast.

  • The two Settings → Integrations links in the Amazon SES / SQS settings section pointed at /admin/settings/integrations/website, the path core renamed to /admin/settings/integrations in 2.21.3. The old path does not 404: it still matches core’s /admin/settings/integrations/:uuid edit route with uuid = "website", so Repo.get/2 raises Ecto.Query.CastError and LiveView turns it into a 400 reload response that loops.


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