Skip to content

Commit 9419474

Browse files
committed
docs(white-labeling): document mail template placeholders
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.
1 parent 9501f05 commit 9419474

1 file changed

Lines changed: 34 additions & 8 deletions

File tree

src/content/_includes/docs/user-guide/white-labeling-mail.mdx

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,40 @@ To send emails, a tenant administrator must first configure an <DocLink product=
2828

2929
The following mail templates are available for customization:
3030

31-
| Template | Triggered when |
32-
|----------|---------------|
33-
| **Activation** | A new user is created and receives an activation link |
34-
| **Account activated** | A user successfully activates their account |
35-
| **Account lockout** | A user's account is locked due to too many failed login attempts |
36-
| **Password reset** | A user requests a password reset |
37-
| **Password was reset** | A user's password has been successfully changed |
38-
| **Two-factor authentication verification** | A 2FA code is sent to the user |
31+
| Template | Triggered when | Available placeholders |
32+
|----------|----------------|------------------------|
33+
| **Test email message** | An administrator sends a test email while configuring the outgoing mail server | `${targetEmail}` |
34+
| **Account activation message** | A new user is created and receives an activation link | `${activationLink}`, `${activationLinkTtlInHours}`, `${targetEmail}` |
35+
| **Account activated message** | A user successfully activates their account | `${loginLink}`, `${targetEmail}` |
36+
| **Account lockout message** | A user's account is locked due to too many failed login attempts | `${lockoutAccount}`, `${maxFailedLoginAttempts}`, `${targetEmail}` |
37+
| **Reset password message** | A user requests a password reset | `${passwordResetLink}`, `${passwordResetLinkTtlInHours}`, `${targetEmail}` |
38+
| **Password was reset message** | A user's password has been successfully changed | `${loginLink}`, `${targetEmail}` |
39+
| **2FA verification message** | A 2FA code is sent to the user | `${code}`, `${expirationTimeSeconds}`, `${targetEmail}` |
40+
41+
## Placeholders
42+
43+
The **mail body** is processed as a template, so it supports placeholders written as `${placeholderName}`. The platform substitutes them with actual values before sending the email. The **mail subject** is sent as plain text — placeholders in the subject are not substituted.
44+
45+
Use only the placeholders listed for the given template above.
46+
47+
<Aside type="caution">
48+
A placeholder that the selected template does not provide breaks that template entirely. The message fails to render, so **no email of that type is sent at all** — for any user, and permanently, until you remove the placeholder. The platform does not fall back to the default template and does not leave the placeholder in the text as-is.
49+
50+
For example, adding `${loginLink}` to the **Account activation message** template stops every account activation email, because that template provides only `${activationLink}`, `${activationLinkTtlInHours}` and `${targetEmail}`. The same applies to a typo — `${targetEmai}` breaks the template just as much as an unrelated name.
51+
</Aside>
52+
53+
| Placeholder | Substituted with |
54+
|-------------|------------------|
55+
| `${targetEmail}` | Email address the message is sent to |
56+
| `${activationLink}` | One-time link the user opens to activate their account |
57+
| `${activationLinkTtlInHours}` | Lifetime of the activation link, in hours (rounded up) |
58+
| `${loginLink}` | Link to the platform login page |
59+
| `${lockoutAccount}` | Email address of the account that has been locked out |
60+
| `${maxFailedLoginAttempts}` | Number of failed login attempts that triggers the lockout |
61+
| `${passwordResetLink}` | One-time link the user opens to set a new password |
62+
| `${passwordResetLinkTtlInHours}` | Lifetime of the password reset link, in hours (rounded up) |
63+
| `${code}` | Two-factor authentication verification code |
64+
| `${expirationTimeSeconds}` | Lifetime of the 2FA verification code, in seconds |
3965

4066
<Aside type="tip">
4167
Mail templates support HTML. You can include your company logo, custom colors, and branding to match your white-labeled UI.

0 commit comments

Comments
 (0)