Tutorials

How to Customize Email Templates

Updated: January 31, 2017 Page Information Edit on GitHub

An email template defines the content of an email that is sent to users under predefined circumstances. An email template is usually composed of text and variables. Typically, email templates are used to define the content of email alerts in the Nuxeo Platform.

Creating an Email Template

To create a new mail template:

  1. Go to Templates -> Mail Templates.
  2. Click on the New button to create a new mail template.
  3. Give the mail template a ID and click Next.
  4. In the text area, type the content of the mail. The content is usually composed of text and variables.
  5. When you're done, click Save. Your mail template is saved and can be used in automation chains.

Overriding Default Alert Emails

Default templates for mail notifications can be overridden. Just follow those steps:

 

  1. Create a new Templates > Mail feature in Studio. Choose ID among the ones that are used in the default product, like subscriptionsUpdated for instance (see the list of all alert templates).
  2. Fill in the content of the email that you want to be sent.
    If you want to copy from the default content of the template, you can have a look at it from GitHub.
  3. Save.

 

On Nuxeo LTS 2016, in case both nuxeo-jsf-ui and nuxeo-web-ui packages are installed, the document links in notification emails point to the JSF UI. If you want to change this behavior to make them point to the Web UI you need to add the following XML contribution:

<component name="org.nuxeo.ecm.platform.url.service.DocumentViewCodecService.codecs.notificationDocId.webui">
<!-- If you contribute this extension in Nuxeo Studio, start copying from the line below. The component tag is not needed. -->
  <extension target="org.nuxeo.ecm.platform.url.service.DocumentViewCodecService" point="codecs">
    <documentViewCodec name="notificationDocId" enabled="true" prefix="doc"
        class="org.nuxeo.web.ui.url.codec.WebNotificationDocumentIdCodec" priority="1000" />
  </extension>
<!-- If you contribute this extension in Nuxeo Studio, stop copying from here. The component tag is not needed. -->
</component>

Note that the default priority value for the JSF UI contribution is 100 and that the highest priority wins.

See NXP-20929 for details.


5 months ago Manon Lumeau delete ne-step-validation-flow-based-on-lifecycle-only page
7 months ago Bertrand Chauvin Make copying the XML contribution more explicit
7 months ago Andrew Goodricke Add content-review-lts2016 to labels
7 months ago GitHub Fix title consistency
7 months ago Antoine Taillefer NXP-20929: Add How to make the document Links in notification emails point to the new Web UI
7 months ago Kevin Leturc NXP-19481: Update MarkLogic page to detail how to configure range element indexes
2 years ago Solen Guitter 18
2 years ago Solen Guitter 17 | Fix broken link
2 years ago Solen Guitter 16
2 years ago Solen Guitter 15
2 years ago Solen Guitter 14 | merging page with Create a mail template
2 years ago Solen Guitter 13
2 years ago Solen Guitter 12
3 years ago Solen Guitter 11
4 years ago Solen Guitter 9
4 years ago Solen Guitter 10
4 years ago Solen Guitter 8 | Added link to list of notification templates in Explorer
5 years ago Solen Guitter 6 | Added link to related howto
5 years ago Solen Guitter 7 | Migrated to Confluence 4.0
5 years ago Alain Escaffre 4
5 years ago Alain Escaffre 5
5 years ago Alain Escaffre 3
6 years ago Alain Escaffre 1
6 years ago Alain Escaffre 2
History: Created by Alain Escaffre