DEV Community

hediyeh kianmehr
hediyeh kianmehr

Posted on • Edited on

OpenIAM Email Configuration Guide

Overview

This guide provides a step-by-step process to configure email functionality in OpenIAM using a Gmail account. It covers preparing a Gmail account with an App Password, setting up a Mailbox Configuration in OpenIAM, testing email delivery, and creating a Mail Template for automated user notifications.


Table of Contents

  1. Overview
  2. Prepare your Gmail account (Mandatory)
  3. Configuring Mailbox in OpenIAM
  4. Mail Template Editor
  5. User Creation and Email Delivery

Prepare your Gmail account (Mandatory)

  • Go to your Google Account.
  • Open the Security section.
  • Turn on Verification (if it is not already enabled).
  • Click on App passwords.

  • In Select app, choose Other (Custom name) and enter

(Based on the setup)
OpenIAM

  • Click Generate , Google will provide a 16-character password.

Important:
Copy the generated password exactly as shown (for example, A9fG kL2p vQ8rTz) without adding or removing any characters. This password will be used as the SMTP password in OpenIAM.

Note: Your regular Gmail password will not work. Only the generated App Password can be used. Its validity depends on your Gmail security settings and may expire or become invalid based on your account’s security configuration.


Configuring Mailbox in OpenIAM

  • Navigate to the Administration tab.

  • select Mailbox Configuration.

  • Select Create Mailbox Configuration.

Fill in the Mailbox Configuration

Name: desired name

(Based on the setup)
Is Active: checked

Important:

If Read Inbox is checked, enter the email address that will be used to receive and respond to messages.

Is modern auth: unchecked

Default sender:
Enter the email address that will be used to send emails to users.

(Based on the setup)
Default subject prefix:OpenIAM

SMTP username:Enter the email address used as the Default Sender.

SMTP password:Enter the 16-character App Password generated in the "Prepare Your Gmail Account (Mandatory)" step.

Mailbox Configuration Template:G-mail SMTP Relay

Select a template based on your email and domain. Since our domain is Gmail, choose G-mail SMTP Relay.

This template automatically sets the appropriate host and port.

If this template is not available, see the Manual Configuration option.

Manual Configuration (Gmail Domain)

  • SMTP Host/Server: smtp.gmail.com
  • Port: 587
  • TLS/STARTTLS: Enabled

  • Simulation mode:unchecked

This configuration applies specifically to Gmail domain accounts.


Send test mail

Email Address:Enter the email address where you want to test the email.

(Optional)
Is HTML: Enable this if you want to use HTML to style the email.

(Based on the setup)

Subject:Test
Message:hello from OpenIAM

Note: Click Test first.

  • If there are no errors, click Save to apply the configuration.
  • If an error occurs, it is likely related to the SMTP settings.

Note:
In this section, we are testing if the email can be successfully sent from our system.

The email you just created is a basic setup for further configuration. To continue:

  • Navigate to the Administration tab.

  • Select Mail Template Editor.

Important:

In this section, you can configure the email that will be sent when a new user is added to the system.

Mail Templete Name:New_User_Email

Note:
Because the Mail Template Name is set to New_User_Email, the following behavior occurs:

In this section, you can configure the email that will be sent whenever a new user is added to the system

Mail Templete Content:Enter your HTML code here to design the email template.

(Optional)

  • Mail Template Propertise:identity

  • Navigate to User Admin.
  • Navigate to Create New User.
  • Select Turn to Classic View.

When a new user is created, the email we configured will be sent to the user.

Top comments (0)