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 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 Provider Plugin.

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.