Define a emailTemplateStyle
In theshared/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:
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 thedefaulttenant 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 thedefaulttenant 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
defaulttenant localization file is used.
- Specifying the
Customize text
To customize the content of an existing email notification for anewtenant tenant with language lang and country COUNTRY:
- Copy the content of
shared/email_templates/locale/default.ymlto the clipboard. - Use the context menu for the
localefolder to create a new file inside of it. - Enter
newtenant_lang_COUNTRY.ymlas the name for the file in the dialog box that appears. Click Create. - Scroll down to the file you just created, click it, and paste the copied content in the right pane.
- 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 anewtenant tenant:
- Copy the content of
shared/email_templates/style/default.ymlto the clipboard. - Use the context menu for the
stylefolder to create a new file inside of it. - Enter
newtenant.ymlas the name for the file in the dialog box that appears. Click Create. - Scroll down to the file you just created, click it, and paste the copied content in the right pane.
- Change the values of
newtenant.ymlaccording to the tenant style.
Customize company information
To customize the company information of email notifications for anewtenant tenant:
- Copy the content of
shared/email_templates/info/default.ymlto the clipboard. - Use the context menu for the
infofolder to create a new file inside of it. - Enter
newtenant.ymlas the name for the file in the dialog box that appears. Click Create. - Scroll down to the file you just created, click it, and paste the copied content in the right pane.
- Change the values of
newtenant.ymlaccording 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-tenantemail 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, The tenant value must consist of letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Note: periods (.) are not allowed.
my-custom-tenant-header instead of x-ag-tenant, you need to edit activeguard/core/active_guard.yml the following way:Defining an authentication backend for email notifications
This feature allows configuring a per-tenant authenticationBackend parameter inguarded_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.