Skip to content

Commit

Permalink
upgraded to docusaurus 2.1.0 and wrote email setup article.
Browse files Browse the repository at this point in the history
  • Loading branch information
xgp committed Oct 5, 2022
1 parent 6029693 commit 3315f31
Show file tree
Hide file tree
Showing 6 changed files with 847 additions and 522 deletions.
41 changes: 41 additions & 0 deletions blog/2022-10-05-set-up-email.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
slug: set-up-email
title: Set Up Email in Phase Two
author: Phase Two
tags: [ tutorial, keycloak, phase_two, email ]
---

One of the first things you will need to do when getting a Keycloak Realm ready for use is to set up your email server configuration. There are many system emails that are sent to users in the course of verifying and updating user accounts: Email address verification, magic links, password reset, account update, login failure notifications, identity provider linking, etc.

In order to provide your users with a positive experience, these messages need a way to get to them. Keycloak supports any internet reachable SMTP server. If you are currently testing, and don't have an email server or service that you currently use, [SendGrid](https://sendgrid.com/) provides free accounts that allow you to send up to 100 emails per day forever.

If you are using a Phase Two Deployment, log in to the self-service dashboard, and click on the **Open Console** link for the Deployment you wish to use. Once in the Keycloak admin console, click **Realm settings** in the left menu, and then click the **Email** tab.

![](/blog/2022-10-05-set-up-email-template.png)

In the first section, labeled **Template**, you will set options that will be used in the templates for the emails that are sent to your users. The only required field is the **From** field, which must contain the email address the user will see the email originating from. This should be an email address that your email server is expecting, and it will not block for authorization reasons.

The other fields in the **Template** section are not required, but will enhance how your emails look:

- **From** address used to send emails (required)
- **From display name** a user-friendly name displayed along **From**
- **Reply to** an email address that will be used by email clients when your user replies to an email
- **Reply to display name** a user-friendly name displayed along **Reply to**
- **Envelope from** Bounce Address used for the mails sent

![](/blog/2022-10-05-set-up-email-connection.png)

In the **Connection & Authentication** section, you will provide details of your SMTP server:

- **Host** indicates the SMTP server hostname used for sending emails
- **Port** indicates the SMTP server port (usually 25, 465, 587, or 2525)
- **Encryption** support encryption for communication with your SMTP server
- **Authentication** if your SMTP server requires authentication, and supply the **Username** and **Password**

![](/blog/2022-10-05-set-up-email-buttons.png)

Finally, before you click **Save**, click the **Test connection** button to send a test email to the email address of the currently logged in user. If you don't have that set, you might have click **Save** and edit your user before you come back. You'll receive a success message, or information that will help you resolve problems.

Once you do that, you'll have accomplished a significant task which enables lots of other functionality!

Also, stay tuned for another post on how to customize your email templates to match your branding and messaging.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
"serve": "docusaurus serve"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.21",
"@docusaurus/plugin-google-analytics": "2.0.0-beta.21",
"@docusaurus/preset-classic": "2.0.0-beta.21",
"@docusaurus/theme-live-codeblock": "2.0.0-beta.21",
"@docusaurus/core": "2.1.0",
"@docusaurus/plugin-google-analytics": "2.1.0",
"@docusaurus/preset-classic": "2.1.0",
"@docusaurus/theme-live-codeblock": "2.1.0",
"classnames": "^2.2.6",
"docusaurus-preset-openapi": "0.6.0",
"keycloak-js": "^18.0.1",
"docusaurus-preset-openapi": "0.6.2",
"keycloak-js": "^19.0.2",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-responsive-carousel": "^3.2.8",
"react-rotating-text": "^1.4.1"
},
"resolutions": {
"@docusaurus/core": "2.0.0-beta.21",
"@docusaurus/plugin-google-analytics": "2.0.0-beta.21",
"@docusaurus/preset-classic": "2.0.0-beta.21",
"@docusaurus/mdx-loader": "2.0.0-beta.21",
"@docusaurus/plugin-content-docs": "2.0.0-beta.21",
"@docusaurus/plugin-google-analytics": "2.0.0-beta.21",
"@docusaurus/types": "2.0.0-beta.21",
"@docusaurus/utils-validation": "2.0.0-beta.21",
"@docusaurus/utils": "2.0.0-beta.21"
"@docusaurus/core": "2.1.0",
"@docusaurus/plugin-google-analytics": "2.1.0",
"@docusaurus/preset-classic": "2.1.0",
"@docusaurus/mdx-loader": "2.1.0",
"@docusaurus/plugin-content-docs": "2.1.0",
"@docusaurus/plugin-google-analytics": "2.1.0",
"@docusaurus/types": "2.1.0",
"@docusaurus/utils-validation": "2.1.0",
"@docusaurus/utils": "2.1.0"
},
"browserslist": {
"production": [
Expand Down
Binary file added static/blog/2022-10-05-set-up-email-buttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3315f31

Please sign in to comment.