e-trainiaDocs
Integration

How to Setup the Email Configuration

Email Configuration

SITE SETTINGS / INTEGRATIONS
Email Configuration
This page shows you how to set up the email configuration form used before a course is purchased. It lets the platform send course-related emails (enrolment confirmations, receipts and notifications) using the delivery method you choose.
EMAIL DELIVERY GMAIL OAUTH | SMTP

Steps to Navigate

Step 1: Access Site Settings

  1. Click Site Settings in the left sidebar (or top navigation).
  2. Click the Integrations tab.

Step 2: Choose Email Configuration


1. Email Delivery Method (2 options)

CONFIGURATION OVERVIEW
This decides how the app sends emails.

OPTION 01
Gmail
OAuth / API-based
Secure Google sign-in
OPTION 02
SMTP
Custom mail server
Custom server configuration

Gmail (OAuth / API-based)

  • Connects to Gmail through Google's secure sign-in (OAuth 2.0).
  • You click "Sign in with Google" and allow the app access.
  • Even when Gmail is chosen, you must still fill in all the SMTP fields below. The Update button only works when every required field has a value. If any field is blank, the configuration cannot be saved.
  • The SMTP fields act as a backup if the Gmail sign-in expires or is cancelled.
  • Use the "Send Test Mail" button to check the configuration before you save.

SMTP (Custom mail server)

  • Uses standard SMTP to connect to a mail server (Gmail SMTP, Outlook, Zoho, your own server and so on).
  • Needs the host, port, HELO domain, username, password and encryption.
  • All fields in sections 2–7 apply.
  • Use the "Send Test Mail" button to check the configuration before you save.

Configuration Note

In this setup, we chose SMTP, so everything below applies. If you choose Gmail, you must still fill in every field below. The Update button is always enabled, but if any field is empty, an error is shown and the configuration cannot be saved.


2. SMTP Server (Host)

SERVER DETAILS
SMTP Host Reference
This is the address of the mail server that accepts and sends your outgoing emails. Think of it as the "post office" your app hands the letter to.

Example values:

ProviderSMTP Host
Gmailsmtp.gmail.com
Outlooksmtp.office365.com
Zohosmtp.zoho.com
Custommail.yourdomain.com

3. SMTP Port

The network door number on the SMTP server.

SMTP PORT REFERENCE
PortEncryptionTypical Use
25None / STARTTLSOld, often blocked by internet providers
465SSL/TLS (implicit)Secure from the start
587STARTTLS (explicit)Most common and recommended
2525STARTTLSBackup when 587 is blocked

4. SMTP Helo Domain

When your app connects to the SMTP server, the first thing it says is:

SMTP COMMAND
HELO yourdomain.com

That text is the HELO domain (also called the "localhost name").

Why it matters:

  • Some SMTP servers reject connections where the HELO looks fake (localhost, 127.0.0.1 or random text).
  • Spam filters check it. A HELO domain that does not match raises your spam score.
  • Best practice: enter your actual domain, for example nextorbit.com or etrainia.com.

If you leave it blank, the app usually uses the server's own name or localhost. This can get your emails marked as spam or rejected.

Required Field

This field must not be left blank. The Update button is always enabled, but if this field is empty, clicking Update shows an error and the configuration is not saved.


5. SMTP Authentication (3 options)

This decides how your app proves it is allowed to send mail.

OPTION 01
None
No username or password.
OPTION 02
Login
Username and password.
OPTION 03
Plain
AUTH PLAIN method.

None

  • No username or password is sent.
  • Works only on internal or trusted mail servers (for example, a company intranet SMTP server).
  • Public servers (Gmail, Outlook) reject this.
  • Use it only if your SMTP server is on your own network and set up to allow your IP address.

Login

  • Standard username and password sign-in (AUTH LOGIN / AUTH PLAIN behind the scenes).
  • Almost all providers use this.
  • Your credentials are the email address and the app password or SMTP password.

Plain

  • AUTH PLAIN sends the username and password together in one go, in encoded form.
  • Works the same as Login, with a different method.
  • Safe only over TLS or SSL. Without them, the password is only encoded, not encrypted.
  • Many servers support both. The app picks one.

Recommended

For Gmail, Outlook or Zoho, choose Login (or Plain, both work).


6. Email + SMTP Password

AUTHENTICATION CREDENTIALS
EMAIL
The full email address used to sign in.
SMTP PASSWORD
The password or app password used for SMTP authentication.
  • Email: the full email address used to sign in, for example noreply@nextorbit.com.
  • SMTP Password:
  • For Gmail with 2-step verification (2FA), you must use an App Password (16 characters), not your real password.
  • For Gmail without 2-step verification, use "Less secure app access" (Google no longer supports this).
  • For Outlook or Zoho, usually your account password or an app password.
  • For custom servers, use the password your mail admin set.

Security Warning

Never store this in plain text in the app. Use:

  • Android: EncryptedSharedPreferences or Keystore
  • Server: encrypted DB column + environment secrets

Required Fields

Note: Both fields must be filled. The Update button is always enabled, but if either field is empty, clicking Update shows an error and the configuration is not saved.


7. The 3 Checkboxes

These options control the SMTP connection and its security settings.

7.1 — "Automatically use STARTTLS if available"

STARTTLS ENCRYPTION
Upgrade an existing connection to TLS

STARTTLS means the connection starts plain, then upgrades to TLS using the STARTTLS command.

  • If checked: the app connects plain and asks the server "Can we use TLS?" If yes, it upgrades. If no, it carries on plain (⚠️ risk).
  • If unchecked: the app never tries to upgrade to TLS.
  • Recommended: checked, with port 587.

Think of it as: "Knock on the door, then ask to move to a private room."

7.2 — "Use SSL connection"

SSL / TLS ENCRYPTION
Encrypted connection from the beginning

SSL/TLS (implicit) means the connection is encrypted from the very start.

  • If checked: the app encrypts the connection straight away. Usually port 465.
  • If unchecked: no implicit SSL is used.
  • Do NOT check both SSL and STARTTLS at the same time. They are two different ways to encrypt.

Think of it as: "The door itself is a vault — you're secure from the moment you enter."

Quick decision table

PORT & ENCRYPTION COMBINATION
PortSTARTTLSSSLResult
587✅❌Correct (recommended)
465❌✅Correct
25✅❌Old, often blocked
587❌❌Plain text — ❌ insecure
465✅✅❌ Conflict — will fail

7.3 — "Active Status" (Active / Inactive)

● Active
Configuration is in use.
● Inactive
Configuration is not in use.

This is a toggle for the whole configuration, not a protocol option.

  • Active → the app uses this configuration to send emails.
  • Inactive → the configuration is saved but not used. The app falls back to the default, Gmail, or sending is turned off.

When to use it:

  • Admin is testing a new configuration → keep it Inactive until it is checked.
  • Multiple configurations stored → only one Active at a time.
  • Turn sending off for a while without deleting credentials.

8. Send Test Mail

CONFIGURATION VERIFICATION
Send Test Mail
Before you click Update, you can check the configuration by sending a test email.

How it works

Fill in all fields (even if Gmail is selected, every field is required).

Click "Send Test Mail".

A popup appears with:

  • An Email input field.
  • A Cancel button.
  • A Send button.

The app tries to connect using the values in the form (SMTP host, port, HELO, authentication, credentials and TLS/SSL settings).

A test email is sent to the Email address entered in the popup.

The result is shown:

  • ✅ Success: "Test mail sent successfully" (check your inbox and spam folder).
  • ❌ Failure: an error message explains why (wrong host, wrong port, sign-in failed, TLS mismatch, blocked by a firewall and so on).

ActionWhat Happens
SendTest mail is sent to the entered email address. Success or failure is shown.
CancelPopup closes. No test mail is sent. Nothing happens.

Important

The test mail is only sent when you click Send. Clicking Cancel closes the popup and no email is delivered. The configuration is not tested.

Why use it

  • Confirms the SMTP credentials are correct before saving.
  • Catches port and TLS mismatches (for example, 465 with STARTTLS instead of SSL).
  • Verifies the HELO domain is accepted by the server.
  • Ensures the "from" address is allowed to send.
  • Avoids saving a broken configuration that would fail quietly later.

When Gmail is selected

  • Even though Gmail normally uses its own sign-in (OAuth), the test mail still uses the SMTP fields you filled in.
  • This proves the backup SMTP route works.
  • If the Gmail sign-in is active, the app may also offer a test through Gmail.

Important

The Update button is always enabled. If any field is empty, including when Gmail is selected, clicking Update shows an error and the configuration is not saved. Send Test Mail is the way to check the configuration before saving.


9. What Is Shown and Required for Each Delivery Method

DELIVERY METHOD COMPARISON
Field / OptionGmail (OAuth)SMTP
Sign in with Google✅ Shown❌ Hidden
SMTP Server (Host)✅ Shown & Required✅ Shown & Required
SMTP Port✅ Shown & Required✅ Shown & Required
SMTP Helo Domain✅ Shown & Required✅ Shown & Required
SMTP Authentication✅ Shown & Required✅ Shown & Required
Email✅ Shown & Required✅ Shown & Required
SMTP Password✅ Shown & Required✅ Shown & Required
Automatically use STARTTLS✅ Shown & Required✅ Shown & Required
Use SSL connection✅ Shown & Required✅ Shown & Required
Active Status✅ Shown✅ Shown
Send Test Mail✅ Available✅ Available
Update button enabled✅ Available✅ Available

Important

Choosing Gmail does not hide the SMTP fields. Every field must be filled in. The Update button is always enabled, but clicking it with any empty field shows an error and the configuration is not saved. Use Send Test Mail to check before you save.


For Gmail (OAuth): all fields are still required

RECOMMENDED CONFIGURATION
Gmail OAuth + SMTP

Delivery Method : Gmail (OAuth / API-based)
Sign in with Google : [ Click & Authorize ]
SMTP Server : smtp.gmail.com
SMTP Port : 587
HELO Domain : yourdomain.com
Authentication : Login
Email : yourname@gmail.com
SMTP Password : **** **** **** **** # 16-char App Password
STARTTLS : [x] Automatically use STARTTLS if available
SSL : [ ] Use SSL connection
Status : Active
Action : [ Send Test Mail ] → [ Update ]

Email Delivery Configuration

Last updated on