Customize emails to notify password expiration
This page describes how to customize the emails to remind users to change their passwords before they expire
Abiquo will customize emails using template and properties files with the following priority:
Localized files, with a language code extension, such as
passwordNotificationTemplate_en_US.mustache
andpasswordNotification_en_US.properties
Main files with no language code extension, such as
passwordNotificationTemplate.mustache
andpasswordNotification.properties
System defaults. We use the contents of the system default files in the examples below
To customize the emails to remind users to change their Abiquo passwords:
Log in to the Abiquo API Server as an administrator
In the
config
folder, if there is nomail
folder, create amail
folder and set the owner as thetomcat
user/opt/abiquo/config/mail
In the
mail
folder, create the custom files as required. You can create localized files and main files.
The content of the default files is shown here.Email file:
for example, as a localized file for US English,passwordNotificationTemplate_en_US.mustache
<p>Dear {{username}},</p> <p>Your password will expire in {{days}} days. Please change your password as soon as possible. </p> <p>Thank you,</p> <p>The Abiquo Team</p>
Properties file:
for example, as a localized file for US English,passwordNotification_en_US.properties
subject=Password Expiration Notification
If you change the
subject
property, you must restart the Tomcat server to apply your changes
Optionally, add custom variables and content.
In the email body, to add a custom variable, use double curly braces (also called double mustaches). For example
Then in your properties file, set a value for your custom variable
To create a template property that will return unescaped HTML enter the triple mustache of
{{{
and}}}
around the property name. For example:Then set a variable in your property files
If your users have a different locale, such as when they use a language other than English, use the language code for the user locale
For example, for
Spanish - Spain
changeen_US
toes_ES
.You can set a locale when you create an Abiquo user
Change the owner of the files to the
tomcat
userIf you changed the subject property, restart the Tomcat server
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved