Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
styledecimal

Introduction

You can create new (and modify existing)

Customize notification e-mail templates

In Syncope you can customize and create your own template messages to personalize customize the body of notification messages. This can be achived achieved by creating and / or modifying the notification e-mail template files.

Template files

Templates are defined by their name.

Each template is made up modifing the email template files. Each e-mail template it's made of a couple of files:one for HTML version and one for the text version of the email message body.

Default template direcotry is located at "/WEB-INF/classes/mailTemplates" of Syncope core web application.

  • the rich-text HTML variant (with extension .html.vm)
  • the plain text variant (with extension .txt.vm)

For example, the default optin template is defined byIt contains the "optin" default notification template files:

  • optin.html.vm
  • optin.txt.vm

These files are Velocity template files. Syncope use Velocity (http://velocity.apache.org) as template engine to reference and process objects injected by Syncope.

Template location

Assuming you have generated and built your own project, existing templates (including the default optin template) are located under

Code Block
core/target/syncope/WEB-INF/classes/mailTemplates/

You need If you want to create your own email template, e.g. "custom-notification", you just need to create a couple of files named "custom-notification.html.vm" and "custom-notification.txt.vm"template files (or copy existing to modify) under

Code Block
core/src/main/resources/mailTemplates/

Template format

Template files are interpreted using the Velocity engine; check the language reference.

Besides standard expressions, you can use the following Syncope-specific Within these files you can use Velocity expressions and reference the following Syncope
injected variables:

  • user
  • syncopeConf

...

  • recipients
  • events