📧Email customization
Customize the default email template
Introduced in v4.8.0
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/loginorsrc/accountexsists, if it's the case it will assume that this is a standalong keycloak theme and createsrc/emailThere is a
keycloak-themedirectory somewhere in yoursrcdirectory. 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.

Last updated
Was this helpful?
