Overview
Mango by Radix IoT uses outbound email for alarm notifications, event handlers, scheduled reports, and password-reset links. These features require a valid SMTP connection. This guide covers UI and properties-file configuration, common providers, testing, event handlers, and delivery troubleshooting.
Prerequisites
- A running Mango 4.x or 5.x instance with administrator access
- An SMTP server or email service account
- Network access from Mango to the SMTP host and port
- Two-factor authentication enabled if using a Gmail App Password
- A valid email address on the administrator account used for testing
Step 1: Open Email System Settings
The most common method is the UI:
- Log in as an administrator.
- Go to Administration > System settings.
- Select Email settings.
For headless or automated setups, use a properties file. There is no --config command-line flag. An explicit path comes from the mango.config Java system property, or the mango_config or MA_ENV_PROPERTIES environment variables. With none of those set, Mango takes the first file that exists from <data directory>/mango.properties (the recommended location), <data directory>/env.properties, ~/mango.properties, and two legacy paths under the installation directory. Only one file is ever read, so a second one sitting beside it is silently ignored.
Values resolve in this order, highest first: Java system properties (-Dmango.<key>), environment variables (mango_<key>, underscores in place of dots), your config file, then Mango’s built-in defaults on the classpath. Your config file is optional; nothing creates it for you.
Add overrides as systemSettings.<key>=<value>. Mango watches the configuration file and hot-reloads changes after it is saved, so no restart is required — that watcher is on unless you set properties.reloading=false.
Step 2: Configure SMTP
| UI Field | Property Override Key | Description |
|---|---|---|
| Disable sending emails | systemSettings.emailDisabled |
Master switch at the top of the page; hides every field below it while on |
| SMTP host | systemSettings.emailSmtpHost |
Mail-server hostname |
| SMTP port | systemSettings.emailSmtpPort |
Usually 587 for STARTTLS or 465 for implicit SSL |
| “From” address | systemSettings.emailFromAddress |
Sender address |
| “From” name | systemSettings.emailFromName |
Sender display name |
| Use authorization | systemSettings.emailAuthorization |
true when the server requires login |
| Username | systemSettings.emailSmtpUsername |
SMTP username |
| Password | systemSettings.emailSmtpPassword |
SMTP password or provider token |
| Enable TLS | systemSettings.emailTls |
true for STARTTLS |
Related overrides include systemSettings.emailSendTimeout, systemSettings.emailContentType, and systemSettings.emailDisabled. The last setting suppresses all outbound email without removing the connection configuration, and it is the same Disable sending emails checkbox that sits at the top of the Email settings page — while it is on, every other field on that page is hidden.
Warning
Setting a value in the properties file takes that field away from the UI. A property beats the database, so the Email settings page will refuse to save the field with “Cannot be configured, this setting has been overridden by a property or environment variable”. Pick one method per setting. systemSettings.disableConfiguration=true does the same thing to every system setting at once.
Example <data directory>/mango.properties:
systemSettings.emailSmtpHost=smtp.yourserver.com
systemSettings.emailSmtpPort=587
systemSettings.emailFromAddress=mango-alerts@yourcompany.com
systemSettings.emailFromName=Mango Automation
systemSettings.emailAuthorization=true
systemSettings.emailSmtpUsername=mango-alerts@yourcompany.com
systemSettings.emailSmtpPassword=your-password-here
systemSettings.emailTls=true
Warning
Mango email overrides use the systemSettings.email keys shown above. The mail.smtp.* namespace is not a Mango configuration interface — Mango builds those JavaMail properties itself from these settings.
Note
That example puts an SMTP password in a plain-text file on disk. Because system properties and environment variables both outrank the config file, you can keep the secret out of it: supply the password as mango_systemSettings_emailSmtpPassword in the environment instead, and leave the rest of the settings in the file.
Step 3: Configure Gmail
- Enable two-factor authentication under Google Account > Security.
- Generate an App Password under Security > App Passwords.
- Copy the generated password.
- Enter these settings:
| Field | Value |
|---|---|
| SMTP host | smtp.gmail.com |
| SMTP port | 587 |
| “From” address | Your Gmail address |
| Username | Your Gmail address |
| Password | The App Password |
| TLS | true |
Warning
Do not use your regular Gmail password. Use an App Password generated from Google’s security settings.
Note
Gmail sending limits may be unsuitable for high-volume alarms. Use a dedicated transactional email service when notification volume is high.
Step 4: Configure SendGrid
- Create a SendGrid API key with Mail Send permission.
- Copy the key when it is displayed.
- Enter:
| Field | Value |
|---|---|
| SMTP host | smtp.sendgrid.net |
| SMTP port | 587 |
| “From” address | A verified SendGrid sender |
| Username | apikey |
| Password | The SendGrid API key |
| TLS | true |
Note
The SendGrid SMTP username is literally apikey, not the account email address.
Step 5: Configure Microsoft 365
| Field | Value |
|---|---|
| SMTP host | smtp.office365.com |
| SMTP port | 587 |
| “From” address | The Microsoft 365 email address |
| Username | The full email address |
| Password | Account password or approved credential |
| TLS | true |
Warning
Some Microsoft 365 tenants require SMTP AUTH to be enabled for the mailbox. Ask the tenant administrator to verify the mailbox setting if authentication fails.
Step 6: Test Email Delivery
- Go to Administration > System settings > Email settings.
- Click Send test email.
- Check the inbox and spam folder for the logged-in user’s email address.
- If the test fails, review the displayed SMTP session log and
ma.log.
Note
Send test email always sends to the address on the logged-in user’s profile — the button’s own tooltip names that address. This test flow has no recipient field.
Test network connectivity independently with:
openssl s_client -connect smtp.gmail.com:587 -starttls smtp
If the connection opens and displays a certificate, the Mango server can reach the SMTP endpoint.
Warning
If Use authorization is disabled when the server requires a login, Mango raises a TYPE_EMAIL_SEND_FAILURE System Event. The test-email flow also displays an error dialog with the SMTP session log.
Step 7: Use Email Event Handlers
After SMTP works:
- Go to Event Management > Event handlers and add a handler of type Email.
- Select the events that trigger it.
- Fill in Email recipients, and if you need them, the Escalation and Inactive email sections.
- Set Subject line to Include handler name or Include event message.
- Optionally enable Include system information, Include logfile, and Include previous point values for point events.
That point-value count defaults to 10. As its label says, it only applies when the triggering event belongs to a data point; system and data-source events have no associated point history.
For full control, configure an advanced custom FreeMarker template. It uses syntax such as:
${evt.message}
${evt.activeTimestamp?number_to_datetime?string["yyyy/MM/dd HH:mm:ss"]}
Verification
- Send test email reaches the logged-in user’s address.
- Saving
<data directory>/mango.propertiesupdates the settings without a restart, andma.logrecords “Mango properties file reloaded”. ma.logcontains no recurring SMTP errors.- An email event handler delivers a test alarm.
- “From” address and “From” name display correctly.
Troubleshooting
TLS Handshake Failed
- Match port and TLS mode: port 587 normally uses STARTTLS with
systemSettings.emailTls=true; port 465 uses implicit SSL. - Update the Java trust store when certificate authorities are missing.
- Import a corporate proxy’s CA certificate if SSL inspection is in use.
Authentication Failed
- Recheck the username and password.
- For Gmail, use an App Password.
- For SendGrid, use
apikeyas the username. - For Microsoft 365, confirm SMTP AUTH is enabled.
Connection Timed Out
- Test connectivity from the Mango server.
- Review outbound firewall rules.
- Check cloud-provider restrictions on SMTP ports.
- Configure Java proxy settings when required.
Messages Go to Spam
- Configure SPF, DKIM, and DMARC.
- Use a sender address on the authenticated domain.
- Use a transactional email provider for production delivery.
Relay Access Denied
- Confirm the sender is authorized by the SMTP provider.
- For Gmail, use the authenticated account or a configured alias.
- For SendGrid, use a verified sender identity.
Related Guides
- Configuring Event Handlers and Email Alerts
- Configuring Slack Notifications for Mango Alarms
- Creating Excel Reports with Scheduled Email Delivery