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:

ConfigurationMandatoryDescription
recipient-attribute-nameYesThe name of the attribute that contains the email recipient.
recipient-attribute-sourceNoThe source of the attribute that contains the email recipient. Defaults to subject-attributes.
email-provider/idYesThe ID of the email provider to use.
templateNoThe name of the template used to render the email content.
contentNoThe email content.
content/subjectYesThe email subject. May be a message key.
content/titleYesThe heading of the email message. May be a message key.
content/bodyYesThe 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:

NameDescription
subjectAttributesThe current subject attributes.
contextAttributesThe current context attributes.
actionAttributesThe current authentication action attributes.

Back-channel support#

This action can be used in back-channel authentication.

Was this helpful?