Skip to content

✨ Mailer: central brand values via config.mailer.brand #4130

Closed

Description

@PierreBrisorgueil

What

  • Add mailer.brand with these fields:
    • name, falling back to app.title
    • url, falling back to app.url || getBaseUrl()
    • contact, falling back to app.contact
    • logoUrl, primaryColor, textColor, mutedColor, fontFamily, signature, footerText
    • links as a { label: url } object (arrays replace on deep merge)
  • Export a getBrand() getter as the single source of the resolved values.
  • render injects brand, plus the legacy appName (= brand.name) and appContact (= brand.contact). Brand wins over caller-passed values for those two keys only.

Acceptance criteria

  • With no brand config, the output is identical to today's.
  • Setting mailer.brand.name changes {{appName}} in every mail, including templates that exist only in a downstream.
  • DEVKIT_NODE_mailer_brand_<field> env vars set brand values.
  • A partial brand override keeps the other defaults.
  • All brand values render escaped.

Tests

  • Fallbacks with an empty brand.
  • An override from a mocked config shaped like a downstream override.
  • Brand winning over a caller-passed appName.
  • A deepMerge check with a partial brand override.

Depends on: resolver (render).

Needs: #4129

Activity

  1. PierreBrisorgueil commented on Oct 2, 2026

    @PierreBrisorgueil
    ContributorAuthor

    WIP — session 20261002T184249Z-9FAD36D0, branch feat/4130-mailer-brand, started 2026-10-02T18:42:49Z

  2. PierreBrisorgueil commented on Oct 2, 2026

    @PierreBrisorgueil
    ContributorAuthor

    merged via drain (Automerge: absent, --review: false) — PR #4165. Reviewer: CodeRabbit (1 finding fixed) + Claude fallback on final head (CodeRabbit rate-limited).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions