Skip to main content

Managing Email Notification Templates

Jive includes a set of email templates that send auto-generated emails in response to specific events, providing flexibility in communication with users. You can edit these templates to modify content, include password reset notifications, and localize messages for users in different languages.

Accessing Email Templates

Fastpath

Admin Console: System > Settings > Message Templates

Editing Email Templates

You can edit any of the application's email templates. While editing the header and footer templates is encouraged, we recommend limiting changes to other templates, as extensive customizations can complicate upgrade tasks.

Templates cover various actions in the application, such as notifications for content changes, password reset requests, and more rare events. You can customize the header and footer of outbound emails and add new templates in unavailable locales.

Caution

While customizing templates, remember that these changes may increase your upgrade tasks.

Note: Specific aspects of email configuration are set in other parts of the Admin Console. For instance, moderation email settings can be found on the Discussions settings pages.

Email Format

Email messages can be sent as plain text or HTML, with each template including both versions.

Localizing Email Notification Templates

You can set email templates for additional languages so that users receive auto-generated emails in their language. Jive automatically displays localized content when the user's language and locale match the specified template locale.

When creating email templates, include the locale in the file name (e.g., mail_template_fr.xml for French). Users setting their preferences to a language and locale that matches the template will see the localized content. However, if a user's locale does not match precisely, the default English template is shown.

For example:

  • If you have mail_template_fr.xml, only users with French set as their language see the translated content.
  • For users who specify French and a specific locale like France, create mail_template_fr_FR.xml to ensure they see the French version.
  • To show French to users who specify Belgium, include mail_template_fr_BE.xml.

Placeholder Tokens

Use Apache FreeMarker syntax for placeholder tokens in your templates. Each template supports specific tokens for email content, which may vary by message. For instance, a document notification email includes tokens for the followed document, the following user, and the document URL. Reference tokens using syntax such as ${document}, ${user}, or ${docURL}.

Examples

Here are template examples for notifying a user that an item they’re following has been updated:

Plain Text Template Example

${contentAuthorName} <#if contentAuthorURL?has_content>[${contentAuthorURL}]</#if> <#if isNewContentItem?? && isNewContentItem>created<#else>modified</#if> the document:

"${contentSubject}"

To view the document, visit: ${contentURL}

<#if includePostContentInEmail && !docVerseDocument && !binaryDocument>
--------------------------------------------------------------
${contentTextBody}
--------------------------------------------------------------
</#if>

<#if emailReplyEnabled>
...

HTML Template Example

<h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
${contentSubject}
</h3>
<span style="margin-bottom: 10px;">
<#if isNewContentItem?? && isNewContentItem>created by<#else>modified by</#if> <#if contentAuthorURL?has_content><a href="${contentAuthorURL}">${contentAuthorName}</a><#else>${contentAuthorName}</#if> in <i>${containerName}</i> - <a href="${contentURL}">View the full document</a>
</span>
...

Password Information in Email Templates

For security reasons, avoid embedding user passwords in email content. The User Creation Welcome Email template allows the ${password} token, but we recommend including links for password resets instead. Use the following markup to guide users to reset their passwords securely:

Plain Text Example

<#if jiveURL?has_content>
Someone created your account on your behalf. If you did not receive a password from that person,
you'll need to click on "I forgot my password" or go to reset your password
at ${instanceURL}emailPasswordToken!input.jspa
<#else>
Someone created your account on your behalf. If you did not receive a password from that person,
you'll need to click on "I forgot my password"
</#if>
username: ${newUserUsername}

HTML Example

<p>
<#if jiveURL?has_content>
Someone created your account on your behalf. If you did not receive a password from that person,
you'll need to click on "I forgot my password" or go to reset your password
at <a href='${instanceURL}emailPasswordToken!input.jspa'>${instanceURL}emailPasswordToken!input.jspa</a> to update your password.<br>
<#else>
Someone created your account on your behalf. If you did not receive a password from that person,
you'll need to click on "I forgot my password"<br>
</#if>
<br>
username: ${newUserUsername}
</p>