Document mail template placeholders in White labeling - #640
Merged
vvlladd28 merged 1 commit intoSep 1, 2026
Conversation
Add the available placeholders for each mail template and a section describing what each one resolves to. Rename the template rows to match the labels shown in the White labeling > Mail templates drop-down and add the missing Test email message template. Placeholders are only substituted in the mail body — the subject is sent as plain text. Warn that a placeholder the selected template does not provide breaks that template entirely: rendering fails, so no email of that type is sent at all until the placeholder is removed.
volodymyr-babak
approved these changes
Sep 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the ThingsBoard documentation for White labeling → Mail templates to clearly document which FreeMarker placeholders are supported by each template, helping admins avoid silent template rendering failures when customizing email bodies.
Changes:
- Expanded the mail template table with an Available placeholders column and aligned template names with the UI labels.
- Added a new Placeholders section explaining substitution behavior (body-only) and documenting each placeholder’s meaning.
- Added the missing Test email message template entry.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
vvlladd28
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The White labeling > Mail templates page listed the available templates but said
nothing about the placeholders you can use inside them, so there was no way to
tell from the docs which variables a given template accepts.
This adds:
placeholders each template provides;
The template rows are also renamed to match the labels shown in the
Mail template drop-down verbatim (
Account activation messageinstead ofActivation, and so on), so the table can be read side by side with the UI.Two behaviours are called out explicitly because they are easy to get wrong and
both break silently:
plain text, so
${...}in a subject reaches the recipient literally.Rendering fails, so no email of that type is sent at all — for any user, and
permanently, until the placeholder is removed. There is no fallback to the
default template, and the placeholder is not left in the text as-is. A typo in
a placeholder name has exactly the same effect.
Everything was verified against the platform sources: the FreeMarker model built
per template in
DefaultMailService, the shipped defaults inmail_templates.json(whose bodies use exactly those variables and no others),and the UI labels in
locale.constant-en_US.json.The three
Api usage statetemplates are intentionally left out: theGET /api/whiteLabel/mailTemplatesendpoint strips them from its response forevery authority, so they never appear in the drop-down and cannot be configured
here.
Type of change
src/content/_includes/**)Affected products
PE, PaaS and PaaS/EU — the page is a PE feature, and all four product stubs
(CE, PE, PaaS, PaaS/EU) share the single include that changed, so the new
content appears on all of them.
Related issues
None.
Checklist
pnpm checkpasses (Astro / TypeScript) — 0 errors, 0 warnings, 0 hintspnpm lint:eslintpassespnpm lint:slugcheckpassespnpm lint:linkcheck— not run. No pages were added, renamed or removedand no links were touched (the one
DocLinkon the page is unchanged), sothere is nothing new for it to resolve. Happy to run it if you'd like.
existing screenshots are unchanged