Keycloak Realm Mail Config

Keycloak Realm Mail Config

In this lightning fast tutorial we’ll configure email settings in a Keycloak Realm. 

Keycloak requires an external email service provider to auto send emails for account management. You can self-host an email service or use a commercial provider. Whichever way you go, you will need to configure your Keycloak realm to connect with your email service provider. That is what we cover here!

Configuring Email in Keycloak

In your Keycloak admin console select the realm that you will configure the email service for,  then in the Keycloak left navigation menu select “Realm Settings”

In the “Realm Settings” menu select “Email”

Input the sender email address, sender display name, reply to email address, reply to display name, and the sender envelope email address.

Under Connection and Authorization set the email host, and port. You can often find this info in your email provider’s docs. For instance for Titan email which I am using I was able to find the info between these couple posts here: https://support.titan.email/hc/en-us/articles/900001846283-Send-email-using-WP-Mail-SMTP-plugin and https://support.titan.email/hc/en-us/articles/900003326106-Send-email-using-Post-SMTP-plugin-Heart-Internet-users

TIP: Google (or Brave it!) your email provider and SMTP connection. The main thing is to determine the host and port you will need to connect to, common ports are 25, 465 (for ssl) and 587 (startTLS). 

Then enable SSL and/or StartTLS, in my case I only enabled StartTLS according to my provider’s documentation. Then enable the Authentication setting and input the username and password for the email account. Once you successfully send a test email you can start sending away! 

That’s a wrap! 

Walter Miely is a tech entrepreneur and CEO of Phoenix Ignited Tech You can find him on Linkedin. This material is licensed under the CC BY 4.0 License LEGAL DISCLAIMER: The content provided here is provided AS IS, and part of, or the entirety of this content may be incorrect. Please read the entireLegal Disclaimer here.