4.6 SMTP Email Configuration
1. Overview
ZTrust uses an SMTP (Simple Mail Transfer Protocol) server to send emails such as:
Account verification emails
Password reset links
OTP codes
Admin notifications
Account Updates, etc
To enable this, you need to configure SMTP settings at the realm level in the ZTrust Admin Console.
2. Prerequisites
Before configuring, ensure you have:
An SMTP server (e.g., Gmail)
A valid email account with username & password
SMTP host, port, and security type (TLS/SSL) details
Proper firewall rules allowing outbound traffic on SMTP port ( 465)
3. Configuration via Admin Console
Login to the ZTrust Admin Console.
Fig 4.6.a: Master realm Click on Manage Realms in the sidebar to view the list of realms available in your ZTrust.
Fig 4.6.b: List of realm under manage realms From the list of realms, select the realm where you want to configure email.
Fig 4.6.c: Demo realm welcome page In the left sidebar, under the Configure section, Navigate to
Realm Settings → Email
Fig 4.6.d: Email tab under realm settings tab Fill in the SMTP details:
FieldDescriptionFrom
Email address that appears in the "From" field of emails.
From Display Name
Name that will be displayed (e.g., "ZTrust Support").
Reply-To
(Optional) Email address for replies.
Host
SMTP server hostname (e.g.,
smtp.gmail.com
).Port
SMTP port ( 465).
Encryption
Choose
SSL
Username
SMTP account username (full email address for most providers).
Password
SMTP account password or app-specific password.
Encryption
select SSL (instead of None or TLS).
Authentication
Keep this option checked if your SMTP server requires login credentials (username & password) to send emails.
Note: The password here does not refer to your email login password. You need to generate an app password from your Gmail account. Follow the steps below to generate the app password.
Log in to the email account for which you need to generate the app password, click on your profile icon, and select Manage your Google Account.
Fig 4.6.e: Gmail account info On the home page, use the search bar to type App Passwords. From the dropdown suggestions, select App Passwords.
Fig 4.6.f: Search for App Passwords under home section You will be redirected to the App Passwords page. Enter a name for the app, for example ZTrust, and then click Create.
Fig 4.6.g: App password tab A random app password will be generated.
Fig 4.6.h: Successfully app password created Copy the generated password, then go to the ZTrust Admin Console. Open the realm where you want to configure SMTP and paste this password in the SMTP settings.
Make sure you have configured the SMTP host, port, username, and password.
Fig 4.6.i: Entered SMTP configuration Then save the configuration. You will see a success notification confirming that the update was successful.
Fig 4.6.j: Saved SMTP configuration Click on Test Connection. A confirmation email will be sent to your email address to verify that the SMTP configuration was successful.
Fig 4.6.k: Successfully connection established You have now successfully configured SMTP email in ZTrust for the selected realm. If you create a new realm, follow the same steps to configure SMTP for that realm as well.
4. Troubleshooting
Emails not being sent?
Check ZTrust logs (
docker logs ZTrust
orZTrust server logs
).Verify SMTP credentials.
Ensure firewall allows outbound SMTP ports.
Authentication failed?
Check username/password.
For Gmail use app password.
SSL handshake errors?
Try switching between TLS/SSL.
Ensure correct port is used.
You have successfully configured SMTP email in ZTrust Admin console for your selected realm. This enables ZTrust to send notification emails such as verification links, password resets, and account updates.
If you create additional realms, simply follow the same steps to configure SMTP for each realm.
Last updated