Configuration · Email template preview & test send

Browse the centre’s transactional email templates, preview the rendered HTML and send a test copy to an address to check how it looks in a real inbox.

AreaConfiguration
Routesconfiguration.email-templates · configuration.email-templates.index
Centre modulesalways available
Staff levelsauthenticated staff with configuration access
Modelsemail-template
UI labeltitle.header.configuration.email-templates / menu.navbar.email-template.show
Coverage3 use cases · 1 happy · 4 failure

How it works

Read-and-test only — templates are not editable here. The route’s sendTestEmail guards its input (throw new TypeError('\email` is not a string’)) and converts a non-OK response into a thrown error, while send-email-template-modal validates the recipient list client-side (isValidEmail/validateEmails`) before calling it. Templates are sorted by label for a usable dropdown.

Use cases

Why someone opens this (3)

  • Checking the registration or password-reset email after a branding change.
  • Sending a test to a colleague for sign-off.
  • Diagnosing a template that renders badly in a particular mail client.

Path map

flowchart LR
    F(["Email template preview and test send"]):::feat
    F --> H1["Template previewed and tested"]:::ok
    F -.-> X1["Invalid recipient address"]:::bad
    F -.-> X2["Non-string recipient"]:::bad
    F -.-> X3["Send fails"]:::bad
    F -.-> X4["No templates"]:::bad
    classDef feat fill:#566066,stroke:#566066,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Template previewed and tested

  1. User opens Configuration → Email templates and picks one from the dropdown.
  2. The rendered HTML preview appears.
  3. The user enters a recipient in the send-test modal; validateEmails passes.
  4. The test is posted to /email_templates/:id/send_test and arrives in the inbox.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Template previewed and tested
  • ⛔ Invalid recipient address
  • ⛔ Non-string recipient
  • ⛔ Send fails
  • ⛔ No templates

Implementation


Generated from doc/feature-inventory.json · id config-email-templates · commit 276788ca6