Authdog
Back to journal

Customize environment email templates

Teams can customize environment-level email templates from the console.

From the changelog: Environment email templates

Authdog Team

2 min read
Centered Authdog mark with an angled Mail word plate on a grainy sky wash with dashed envelope frames

Invite and onboarding copy used to be platform defaults. Teams that wanted a different sender, subject, or body had no environment-scoped place to persist it. Environments can now store email templates in the console and through the management API.

This is the longer note behind the April 6 changelog entry.

How it works

Rows live in environment_email_template_configs, unique on (environment_id, template_key). Each record holds a label, optional description, sender name and email, subject, HTML body, enabled flag, and template variables.

Default keys shipped with the editor:

  • invitation — join-the-workspace invite
  • onboarding — welcome / first-steps copy after invite

Variables include USERNAME, APP_NAME, INVITE_URL, and a locked SENDER_NAME. The branding Emails tab and the welcome-email editor both read this store.

Management GraphQL exposes environmentEmailTemplateConfigs (read, environment:read) and saveEnvironmentEmailTemplateConfig (write, environment:write). A test-send mutation can deliver a preview without changing the saved row.

This is customer-environment mail for users you invite. It is not the platform "Welcome to Authdog" email sent when a developer creates an Authdog account.

Set it up

In the console, open Branding and the Emails tab (or the welcome-email editor on Users):

  1. Select tenant and environment.
  2. Choose invitation or onboarding.
  3. Edit subject and HTML. Keep the locked sender variable unless you also change sender name.
  4. Save. Send a test if the environment has a mail provider configured.

Unsaved preview is not the live template.

Trust boundaries

Template write is an environment privilege. Do not put secrets or session material in the body. A disabled template is not sent. Mail-provider failure is logged; it does not roll back user creation or invite records.

INVITE_URL is only as trustworthy as the invite that generated it.

Try it

Save a distinct subject on invitation, send a test, and confirm the inbox. The original release note is in the changelog.