Send Email Action
The Send Email authentication action allows sending an email to a recipient taken from the current attributes. It supports defining the email content in two ways: directly in the configuration or via a Velocity template. The former is suitable for scenarios where the content is simple and doesn't require access to contextual data. The latter allows total flexibility, providing access to contextual attributes.
Configuration#
The following configuration options are available:
| Configuration | Mandatory | Description |
|---|---|---|
recipient-attribute-name | Yes | The name of the attribute that contains the email recipient. |
recipient-attribute-source | No | The source of the attribute that contains the email recipient. Defaults to subject-attributes. |
email-provider/id | Yes | The ID of the email provider to use. |
template | No | The name of the template used to render the email content. |
content | No | The email content. |
content/subject | Yes | The email subject. May be a message key. |
content/title | Yes | The heading of the email message. May be a message key. |
content/body | Yes | The body of the email message. May be a message key. |
Note that either template or content must be specified.
Templates#
When content is configured, the email is rendered using a built-in template (authentication-action/send-email/default.vm)
which uses an heading and a single paragraph for title and body, respectively.
When template is configured, the template location is resolved relative to the action’s template directory (i.e. authentication-action/send-email).
The Curity Identity Server includes template layouts and conventions for messages keys, which help defining email templates.
For more details refer to Email Providers .
The context for the email templates includes the following properties:
| Name | Description |
|---|---|
subjectAttributes | The current subject attributes. |
contextAttributes | The current context attributes. |
actionAttributes | The current authentication action attributes. |
Back-channel support#
This action can be used in back-channel authentication.