Skip to main content
By default, all tenants use the default email notification style, including logos, colors, and localized text. To customize templates for specific tenants, you can assign each tenant its own branding, style, and localization. XSP matches reported emails to tenants based on the sender’s domain, as defined in guarded_tenants.yml.

Define a emailTemplateStyle

In the shared/email_templates/guarded_tenants.yml file, you will be able to add the emailTemplateStyle optional identifier under the tenants that should use a different style. For e.g:
After defining the emailTemplateStyle attribute in shared/email_templates/guarded_tenants.yml, you need to refer to its value (e.g., exampleDarkModeNoLogo) in all corresponding configuration files. Configure the following by replacing the <emailTemplateStyle> placeholder with the actual value:
  • An optional tenant configuration file that can be customized by modifying shared/email_templates/info/<emailTemplateStyle>.yml. If no tenant configuration file is specified, then the default tenant configuration is used.
  • An optional style file that can be customized by modifying shared/email_templates/style/<emailTemplateStyle>.yml. If no style file is specified, then the default tenant style is used.
  • Define one or more localization files under shared/email_templates/locale, naming them as <emailTemplateStyle>_<language>_<COUNTRY>.yml, where <language> and <COUNTRY> follow the IETF BCP 47 standard, as used by Java Locale.
    • Specifying the <COUNTRY> for a localization file is optional, meaning the localization file could be called <emailTemplateStyle>_<language>.yml.
    • A more specific localization file (e.g., <emailTemplateStyle>_<language>_<COUNTRY>.yml) takes precedence over the less specific one (e.g., <emailTemplateStyle>_<language>.yml)
    • If no template localization file is specified, then the default tenant localization file is used.

Customize text

To customize the content of an existing email notification for a newtenant tenant with language lang and country COUNTRY:
  1. Copy the content of shared/email_templates/locale/default.yml to the clipboard.
  2. Use the context menu for the locale folder to create a new file inside of it.
  3. Enter newtenant_lang_COUNTRY.yml as the name for the file in the dialog box that appears. Click Create.
  4. Scroll down to the file you just created, click it, and paste the copied content in the right pane.
  5. For each template in newtenant_lang_COUNTRY.yml, replace the content with a tenant specific localized text.

Customize style

To customize the look of email notifications for a newtenant tenant:
  1. Copy the content of shared/email_templates/style/default.yml to the clipboard.
  2. Use the context menu for the style folder to create a new file inside of it.
  3. Enter newtenant.yml as the name for the file in the dialog box that appears. Click Create.
  4. Scroll down to the file you just created, click it, and paste the copied content in the right pane.
  5. Change the values of newtenant.yml according to the tenant style.

Customize company information

To customize the company information of email notifications for a newtenant tenant:
  1. Copy the content of shared/email_templates/info/default.yml to the clipboard.
  2. Use the context menu for the info folder to create a new file inside of it.
  3. Enter newtenant.yml as the name for the file in the dialog box that appears. Click Create.
  4. Scroll down to the file you just created, click it, and paste the copied content in the right pane.
  5. Change the values of newtenant.yml according to the tenant company information.

Set a tenant for an email notification

To select a tenant for an email notification in response to a report:
  • Set the x-ag-tenant email header in your email system to the desired tenant name for the template (e.g., newtenant).
Custom email header and a tenantTo read the tenant from a custom header, for example, my-custom-tenant-header instead of x-ag-tenant, you need to edit activeguard/core/active_guard.yml the following way:
The tenant value must consist of letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Note: periods (.) are not allowed.

Defining an authentication backend for email notifications

This feature allows configuring a per-tenant authenticationBackend parameter in guarded_tenants.yml to ensure that email notifications contain URLs that direct users to the appropriate SSQ portal. The authenticationBackend parameter should match one of the values defined in the auth/auth/auth.yml file under enabledAuthBackends.