📧Email customization
Customize the default email template
Introduced in v4.8.0
Currently, customizing emails with React is not possible, and you must use FreeMarker instead. If this poses a significant obstacle for you, please open a new issue to discuss it further.
It is now possible to customize the emails sent to your users to confirm their email address ect.
Just run npx initialize-email-theme
.
For this script to work you must be in one of thoses scenario:
src/login
orsrc/account
exsists, if it's the case it will assume that this is a standalong keycloak theme and createsrc/email
There is a
keycloak-theme
directory somewhere in yoursrc
directory. If it's the case it will createsrc/**/keycloak-theme/email
.
This directory should be tracked by Git (yarn add -A
) You can start hacking the default template.
You can remove all the template and resource file you aren't going to customize (it will fallback to the default email theme as long as you keep a theme.properties
with parent=base
).
When npx keycloakify
(yarn keycloak
) is run it will bundle your email theme into your .jar
file and you will be able to select it in the Keycloak administration pages.
![](https://docs.keycloakify.dev/~gitbook/image?url=https%3A%2F%2F908562933-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FWAuBsOGmo1l9azD8WxxI%252Fuploads%252Fd7tcbptQfhQpBLuK3qwA%252Femail.png%3Falt%3Dmedia%26token%3D9dbd8cbf-ec8b-4342-8404-1d6e905f0a14&width=768&dpr=4&quality=100&sign=6435b654&sv=1)
Last updated