Customize emails for guest password
This page describes how to customize emails to notify users of the VM password set by the platform
Abiquo will customize emails using template and properties files with the following priority:
Localized files, with a language code extension, such as
guestPasswordTemplate_en_US.mustache
andguestPassword_en_US.properties
Main files with no language code extension, such as
guestPasswordTemplate.mustache
andguestPassword.properties
System defaults. The platform uses the contents of the system default files in the examples below
To customize emails to notify users of the guest password:
Log in to the Abiquo API Server as an administrator
In the config folder, if there is no mail folder, create a
mail
folder and set the owner as the tomcat user/opt/abiquo/config/mail
In the mail folder, create the following files
Email file
guestPasswordTemplate_en_US.mustache
<p>Hi {{username}},</p> <p>Your new virtual machine is up and running. You can access it using the following credentials:</p> <p> Virtual machine UUID: {{vmuuid}}<br/> Virtual machine name: {{vmname}}<br/> Virtual machine providerID: {{vmproviderid}}<br/> FQDN: {{fqdn}}<br/> Username: {{loginuser}}<br/> Password: {{loginpassword}} </p> <p>The Abiquo Team</p>
Properties file
guestPassword_en_US.properties
subject=New Virtual machine {0}
 If you change the subject property, you must restart the Tomcat server to apply your changes
The only variable that you can set in the default message is the subjectÂ
If the Fully qualified domain name is not set in the VM, the value of theÂ
FQDN
 variable will beundefined
.
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 value for your custom variable
 To return unescaped HTML as part of a template property, use the triple mustache, which is
{{{
and}}}
.
The Mustache templating software that adds the property values will escape HTML variables in double mustaches by default.
If your users have a language other than English, rename the file to change the language code to the user languageÂ
For example, for
Spanish - Spain
change theÂen_US
 toÂes_ES
The user language is the language of the locale of the user
Change the owner of the files to theÂ
tomcat
 user
Â
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved