← Back to plugin index

Email Message Provider

Description
Generic message provider for emails.
Type name
GenericEmailMessageProvider
Class
com.airlock.iam.flow.shared.application.configuration.message.GenericEmailMessageProviderConfig
May be used by
Properties
Subject Resource Key (subjectResourceKey)
Description
Resource key to select the localized template to generate the subject line. The localized template can contain variables (e.g. ${town}).
Attributes
String
Mandatory
Example
authentication.email.otp.subject
Example
user-self-reg.email.verification.subject
Body Resource Key (bodyResourceKey)
Description
Resource key to select the localized template to generate the email body. The localized template can contain variables (e.g. ${town}). If the email is used to send an email OTP, the template must contain the variable ${TOKEN} which will be replaced by the OTP token.
Attributes
String
Mandatory
Example
authentication.email.otp.body
Example
user-self-reg.email.verification.body-with-otp
Value Providers (valueProviders)
Description

List of value map providers that are used to replace the variables in the localized template. The values providers are called in the configured order and their values are added to a map. Later providers can overwrite values from earlier providers. If no value providers are configured, the localized template should not contain any variables, since all of them would be replaced by empty strings.

If available, the OTP token for the ${TOKEN} variable is automatically added to the map and doesn't have to be configured here.

Security Warning: If e-mails are sent as HTML, make sure to properly escape values originating from untrusted sources (such as user input during self-registration). This can be achieved by enabling the property 'Escape Values in HTML'.

If a more fine-grained control is required, use a 'Transforming Value Map Provider' with an 'HTML String Escaper' to transform all values of the map. (Alternatively, if you want to transform only individual values of a map, use a 'Value Provider Map' with 'Transforming String Value Providers'.)

Attributes
Plugin-List
Optional
Assignable plugins
Escape Values in HTML (escapeValuesInHtml)
Description

HTML-escape all provided values if this message provider is used in an HTML email.

Security Warning: If e-mails are sent as HTML, make sure to properly escape values originating from untrusted sources (such as user input during self-registration). This can be achieved by enabling the property 'Escape Values in HTML'.

If a more fine-grained control is required, use a 'Transforming Value Map Provider' with an 'HTML String Escaper' to transform all values of the map. (Alternatively, if you want to transform only individual values of a map, use a 'Value Provider Map' with 'Transforming String Value Providers'.)

Attributes
Boolean
Optional
Default value
true
YAML Template (with default values)

type: GenericEmailMessageProvider
id: GenericEmailMessageProvider-xxxxxx
displayName: 
comment: 
properties:
  bodyResourceKey:
  escapeValuesInHtml: true
  subjectResourceKey:
  valueProviders: