This content originally appeared on DEV Community and was authored by rounakcodes
Purpose
Email needs to be sent using Keycloak to
- verify email address of user
- allow user to set own password
Steps
Assign email address to admin account
Use Keycloak Account Management to add email address in Personal Info
The below steps work for Keycloak 13 but UI may change with time
- Login to Keycloak Security Admin Console using admin credentials
- Click admin name shown in the top right corner
- Click Manage account
- Click Personal Info
- Enter email address
Configure Email Settings
- Open a realm
- Under Realm Settings > Email the following details will work for a Gmail account
- Host: smtp.gmail.com
- Port: 587 (for SSL, use 465)
- From: admin-email-address
- Enable StartTLS: On (for SSL, use Enable SSL)
- Enable Authentication: On
- Username: username
- Password: password
Configure Gmail
If the admin account is a Gmail account, the below steps are required
- Login to the Gmail account in a browser
- Visit https://www.google.com/settings/security/lesssecureapps
- Change the setting to On
- Visit https://accounts.google.com/DisplayUnlockCaptcha
- Follow on-screen instructions, if any
Related
Keycloak REST API for Managing Users
This content originally appeared on DEV Community and was authored by rounakcodes

rounakcodes | Sciencx (2021-06-12T13:41:59+00:00) Keycloak: Configure Realm Email Settings (Gmail). Retrieved from https://www.scien.cx/2021/06/12/keycloak-configure-realm-email-settings-gmail/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.