-
-
-
- User interface versions
- Building blocks for user interface design
- Adding styles with a css
- Surrounding page
- Changing snippets
- Creating a custom login page (pre 3.4)
- Creating a custom login page
- Using velocity templates within the blueprint
- Create your own web pages
- HTML delivery requirements
- How to customize system mails
-
How to customize system mails
The application sends different emails, for example:
- email address verification during account creation or changing an email address
- providing a code as a second factor at login
- login without a password in the account
- login while password is forgotten (password reset)
- providing a link after 5 failed login attempts
- changing a password when it is expired
- changing a password because it is not strong enough
- providing a single-use login code (beta)
- providing a link as a second factor for forms with permission settings
These emails contain a piece of text combined with a link or a code.
We will explain how to customize these emails.
The from address
You can set the from address in two ways.
- The simplest way is to set the from address in the blueprint properties on the tab 'General'. If needed you can add a velocity script for dynamic behavior.
- If you want to use different from addresses in different database instances, you can set the from address in the application settings. At this moment you can not add a velocity script in the application settings.
The subject
The text in the subject is defined by a label code. If needed, you can add a custom label. You can also use a velocity script for dynamic behavior. See below for more details.
The surrounding page of the body
A system mail gets a default surrounding page.
<html>
<body>
$document.getContent()
</body>
</html>
From UIV 4.0 the system mails will get an improved default surrounding page.
You can add your own surrounding page in the blueprint properties on the tab "User Interface". See below for more details.
The content of the body
The text in the body is defined by a label code. If needed you can add a custom label. You can also use a velocity script for dynamic behavior. See below for more details.
About label codes
These are the label codes
Situation | Subject | Body |
A. email address verification | account system__account email verification subject * |
account system__email body salutation + account system__email address confirmation mail - default body + confirm email address (label on button) |
B. providing a login code as a second factor | account system__two factor login code email subject | account system__two factor login code body |
C. no password in account | account system__passwordUrlEmailSubject * | account system__passwordUrlEmailBody * |
D. password reset | account system__passwordUrlEmailSubject * | account system__passwordUrlEmailBody * |
E. 5 failed login attemps | account system__passwordUrlEmailSubject * | account system__passwordUrlEmailBody * |
F. changing an expired password | account system__passwordUrlEmailSubject * | account system__passwordUrlEmailBody * |
G. password not string enough | account system__passwordUrlEmailSubject * | account system__passwordUrlEmailBody * |
H. single-use login code | no label code yet | no label code yet |
I. providing a link for forms with permission settings | access permission.email subject * | access permission.email body * |
For the label codes in the blue fonts (marker with a *) you can add your own labels in the blueprint.
About velocity
If you use a velocity script, the current service is always available in the velocity context. When you want to use the service to get customized behavior, you should never use the toString representation of the service for your logic. For example, when the service is a ClazzManager or a RecordManager, use getClazz() and getIdentifier().
#set($clazz = $service.getClazz())
#set($clazzIdentifier = $clazz.getIdentifier())
#if($clazzIdentifier == "D1")
do this
#else
do that
#end