Mail Server Settings
Mail server settings define how Key Manager Plus sends email notifications to users. These settings include the connection method, email provider, sender email address, and other configuration details required by the selected provider.
Once configured, the mail server enables Key Manager Plus to send email notifications for user onboarding, expiry alerts, scheduled tasks, and other events.
Configure the mail server settings before adding new users to Key Manager Plus. This helps ensure that newly created users receive email notifications containing their login credentials.
Key Manager Plus supports Microsoft Exchange Service with OAuth-based SMTP authentication, Microsoft Graph Mail integration using the Microsoft Graph API, Google Mail with OAuth-based authentication, and other SMTP-compatible mail servers.
This document covers the following topics in detail:
1. Configuring Microsoft Exchange Service as the Mail Server
Organizations using Microsoft Exchange Online can configure it as the mail server in Key Manager Plus to send onboarding messages, notifications, alerts, and other product-generated emails. Configuring Microsoft Exchange Online as the mail server for Key Manager Plus involves registering Key Manager Plus as an application in the Microsoft Azure portal, assigning the necessary API permissions, and generating a client secret. Follow the steps below to complete the configuration.
1.1 Registering Key Manager Plus as an Application on the Microsoft Azure Portal
To integrate Key Manager Plus with Microsoft Azure, you should register Key Manager Plus as an application in the Microsoft Azure portal. The registration process involves specifying essential details about the application and setting up the necessary configurations. Follow these steps to add Key Manager Plus as a new application in the Azure portal.
- Log in to the Microsoft Azure portal.
- Select the App registrations option under the Azure services section on the Microsoft Azure home page.

- On the App registrations page, click the + New registration button on the top-left corner of the screen.

- Specify the following details on the Register an application page:
- Name - Enter a display name of your choice for the application (e.g., Key Manager Plus)
- Supported account types - Select the appropriate account type.
- Redirect URI - Choose Web from the dropdown and enter the URI of the Key Manager Plus application in the format: https://kmp-server:6565/servlet/OauthServlet.

- Click Register to add Key Manager Plus as an application in the Microsoft Azure portal. You will be redirected to the App registrations page, where you can view the details of the newly registered application.

1.2 Delegating API Permissions to the Key Manager Plus Application
To enable Key Manager Plus to send emails through Microsoft Exchange Online, you should delegate the necessary API permissions to the Key Manager Plus application on the Microsoft Azure portal. Follow these steps to delegate the required API permission to enable Key Manager Plus to send emails securely through Microsoft Exchange Online.
- Go to the App registrations page and select Key Manager Plus (The display name entered during app registration) from the list of registered applications.
- On the left pane, select Manage >> API permissions.
- On the API permissions page, click the +Add a permission button under the Configured permissions section to open the Request API permissions window.
- In the Request API Permissions window, select Microsoft Graph from the available list of Microsoft APIs.
- In the window that opens, select Delegated permissions.
- Under the Delegated Permission tab, locate the following API permissions using the search bar and click the Add Permissions button.
- SMTP.Send
- offline_access
- User.Read
- Click the Grant admin consent for Some Company button beside the + Add a permission button.

- In the pop-up window that opens, click Yes to grant consent for the selected permissions.
1.3 Generating Client Secret on the Microsoft Azure Portal
To complete the setup on the Microsoft Azure portal for using Microsoft Exchange Online as the mail server, you need to generate a client secret. Key Manager Plus will use this client secret to authenticate with Microsoft Exchange Online. Follow these steps to generate the client secret on the Microsoft Azure portal.
- Go to the App registrations page and select Key Manager Plus (The display name entered during app registration) from the list of registered applications.
- Navigate to Manage >> Certificates & secrets from the left pane.
- Switch to the Client secrets tab and click + New client secret.

- In the Add a client secret window, enter a description for the client secret, choose an expiry period from the drop-down menu, and click Add.
- The client secret value will be displayed under the Value column on the Certificates & secrets page. Copy and save this value securely, as it will be shown only once. This client secret is required to configure Microsoft Exchange Online as the mail server in Key Manager Plus.
- Once the application is registered with the required permissions, go to the Key Manager Plus web interface and configure the mail server settings using the obtained client secret value.
1.4 Configuring Microsoft Exchange Service as the Mail Server in Key Manager Plus
Follow these steps to configure Microsoft Exchange Online as the mail server in Key Manager Plus.
- Navigate to Settings >> General Settings >> Mail Server.
- In the Mail Server Settings window, enter the following details:
- Authentication Type - Select OAuth to enable secure authentication with Microsoft Exchange using OAuth.
- SMTP Server - This field is filled by default with smtp.office365.com, which is used by Key Manager Plus to send emails.
- Port - Set to 587 to enable secure communication over TLS.
- Mail Server - Select Microsoft Exchange Service from the drop-down.

- To Address - Enter an email address to verify the mail server configuration after setup.
- From/Sender Address - Enter the sender's email address, which should match the Microsoft Azure sign-in credentials.
- Tenant ID - Enter the directory ID of the Azure application.
- Client ID - Enter the application ID of the Azure application.
- Client Secret - Enter the client secret value created for the Azure application.
- Redirect URL - Copy the URL shown here and add it to the Authentication page of the Microsoft Azure portal.
https://kmp-server:6565/servlet/OauthServlet

- Click Test Mail. The recipient email will receive a test notification from Key Manager Plus.
- Click Save to apply the mail server settings.
2. Configuring Microsoft Graph Mail as the Mail Server
Microsoft Graph Mail integration in Key Manager Plus lets you send notifications and email alerts securely through Microsoft 365 using Graph API instead of legacy SMTP or other mail services. It offers token-based authentication for better security control and seamless mailbox communication with modern Microsoft infrastructure.
2.1 Prerequisites
Before configuring Microsoft Graph Mail as the mail server in Key Manager Plus, you should register Key Manager Plus as an application in the Azure portal and obtain the required authentication values, including Client ID and Client Secret. Once the application registration is complete, ensure that the following Graph API permissions are granted via API Permission >> Add a Permission >> Delegated Permission to enable smooth access and communication between the applications:
- Mail.ReadWrite
- Mail.Send.Shared
- offline_access

2.2 Configuring Microsoft Graph Mail as Mail Server in Key Manager Plus
- Navigate to Settings >> General Settings >> Mail Server.
- On the Mail Server Settings page that appears, set the Connection Protocols to Microsoft Graph and enter the following required details:
- Graph Endpoint - By default, this field is populated with the global endpoint for Microsoft Graph. If the global endpoint is not accessible in your region, specify the appropriate regional endpoint from the list below.
- Microsoft Graph global service - https://graph.microsoft.com/v1.0
- Microsoft Graph for US Government L4 (GCC, GCC High) - https://graph.microsoft.us/v1.0
- Microsoft Graph for US Government L5 (DOD) - https://dod-graph.microsoft.us/v1.0
- Microsoft Graph China operated by 21Vianet - https://microsoftgraph.chinacloudapi.cn/v1.0
- To Address - Enter the recipient email address used for test delivery.
- From/Sender Address - Enter the sender's email address. Ensure that the address entered here matches the email provided in the Microsoft Azure sign-in credentials.
- Tenant ID - Enter the Directory (Tenant) ID of the Azure application.
- Client ID - Enter the Application (Client) ID of the Azure application.
- Client Secret - Enter the client secret value created for the Azure application.
- Redirect URL - Copy the URL shown here and add it to the Redirect URIs under Manage >> Authentication >> Web section of the registered application.
- Click Test Mail to verify the configuration. If successful, a test email will be delivered to the specified recipient.
- Click Save to apply the mail server settings.

After completing these steps, Microsoft Graph Mail will be successfully configured as the mail server for Key Manager Plus.
3. Configuring Google Mail as the Mail Server
To configure Google Mail as the mail server in Key Manager Plus, you should create a project in the Google Cloud and generate the respective Client ID and Client Secret value. Follow the steps below for further configuration details.
3.1 Creating a Google Application for Google as the Mail Server
- Log in to the Google Cloud Console with your credentials.
- Click Select a project from the home page and select New Project from the pop-up that appears.

- In the window that opens, enter the Project Name, select the organization under the Location, and click CREATE.

- Expand the Navigation Menu on the top left and navigate to APIs & Services >> Library.

- Select Gmail API from the available list of APIs using the available search option, then click Enable.

- Click the OAuth consent screen from the left menu, choose the User Type, and click CREATE.

- On the Edit app registration page, enter the application name, fill in all mandatory fields, and click Save and Continue.

- Click ADD OR REMOVE SCOPES button, search for Gmail API, select the scope https://mail.google.com/, and click Update.

- Click Save and continue for the next two occurrences and select BACK TO DASHBOARD.
- From the left panel, navigate to Credentials >> + Create Credentials >> OAuth Client ID.

- In the page that appears, select the Application type as Web Application and provide a Name.
- Under Authorized redirect URIs, click the + ADD URIs and enter the Redirect URL of Key Manager Plus in any one of the below format:
- https://kmp-server.csez.manageenginecorpin.com:6565/servlet/OauthServlet
- https://localhost:6565/servlet/OauthServlet
- Upon entering the required fields, click CREATE.

- In the pop-up that appears, copy and save the Client ID and Client Secret values in a secure location.
- Click DOWNLOAD JSON to download the file containing the authorization server details, then click OK.

Google Mail is now configured as your organization's authorization server.
3.2 Configuring Google Mail as the Mail Server in Key Manager Plus
- Navigate to Settings >> General Settings >> Mail Server.
- On the Mail Server Settings page, enter the following details:
- Authentication Type - Select OAuth to enable secure authentication with Google.
- SMTP Server - This field is filled by default with smtp.gmail.com, which is used by Key Manager Plus to send emails.
- Port - The default port for TLS is 587.
- Mail Server - Select Google from the drop-down.
- To Address - Enter an email address to receive a test notification and verify the configuration.

- From/Sender Address - Enter the sender's Google email address.
- Client ID - Enter the client ID generated in the Google Cloud Console.
- Client Secret - Enter the client secret generated in the Google Cloud Console.
- Redirect URL - The redirect URL should end with a public top-level domain such as .com or .org. Enter the Redirect URL of Key Manager Plus in any one of the below formats as entered while configuring Google as the mail server:
- https://kmp-server.csez.zohocorpin.com:6565/servlet/OauthServlet
- https://localhost:6565/servlet/OauthServlet
The Google application accepts only the redirect URLs that end with a public top-level domain such as .com or .org.
- You have now configured Google Mail as your mail server for your organization.
4. Configuring Other Mail Servers
Key Manager Plus allows you to configure any SMTP mail server to send email notifications. Follow the steps below to configure an SMTP mail server in Key Manager Plus:
- Navigate to Settings >> General Settings >> Mail Server.
- In the Mail Server Settings window, enter the following details:
- Authentication Type - Select Basic to configure SMTP using username and password authentication.
- SMTP Server - Enter the SMTP server hostname, for example, smtp.manageengine.com.
- Port - Most SMTP servers work with port 25. However, the default port for TLS is 587, and for SSL is 465.

- From/Sender Address - Enter the sender's email address used to send notifications.
- To Address - Enter the recipient email address for whom the emails are to be sent from the Key Manager Plus.
- Requires Authentication - Enable this option if the SMTP server requires authentication.
- Enter the User Name of the SMTP server and the corresponding Password and click Save.
- You also have the option to choose between the supported secure connection protocols, such as SSL and TLS, or without any encryption.
- SSL - Secure Sockets Layer (SSL) is a cryptographic protocol that enables secure connection over the internet.
- TLS - Transport Layer Security (TLS) is a new version of SSL that enables secure connection over the internet.
- Once you have provided the necessary authentication details and selected the secure connection mode, click Test Mail to test the connection and Save to save the configured mail server settings.
You have now configured your organization's SMTP mail server as the mail server for Key Manager Plus.
- It is recommended using SSL/TLS options for secure communication over the internet/intranet.
- If the mail server uses a self-signed certificate, you should import the certificate into the Key Manager Plus certificate store.
- Copy the mail server certificate to the <Key-Manager-Plus-Installation-Directory>/bin directory.
- From the <Key-Manager-Plus-Installation-Directory>/bin directory, execute the following command.
importCert.bat <name of the server certificate>
This command adds the certificate to the Key Manager Plus certificate store.