Skip to content

Mail#

Empowerment Center sends email for subscriptions, data alerts, operations and scheduling notices and some notices to users. Everything goes out through a single SMTP server of your organization. Without it, the rest of ECenter works the same, but no email goes out. This page says which emails ECenter sends and how to check that they go out; the configuration of the mail server, its timeouts and the limits of the sends are in Mail and notices.

Before you start#

  • The mail server is configured with the SPRING_MAIL_* variables and the sender with ECENTER_MAIL_FROM, in the backend's environment, and it applies on restarting it. The timeouts, the notices and the limits of the sends are explained in Mail and notices.
  • Users receive the email at the address in their record (Administration › Users and roles). A user without an address receives neither subscriptions nor notices.

Which emails ECenter sends#

Email To whom When Configured in
Delivery of a subscription Each recipient According to its schedule or after the workbook's recalculation or publication Each user creates it; limits in ecenter.distribution.*
Test of a subscription Whoever clicks Send me a test When clicked —
Notice of a data alert Each recipient When it triggers or resolves Each user creates it; limits in ecenter.distribution.alerts.*
“Subscription paused: “…”” and “Alert paused: “…”” Its owner When it pauses by itself after 3 consecutive system failures ecenter.distribution.failures-to-pause and ecenter.distribution.alerts.errors-to-pause
Expiry notice of a personal credential Its holder 14 days before a query API or MCP credential expires ecenter.security.credentials.expiry-notice
Operational alerts The operations recipients On opening and resolving, according to the mode ecenter.operations.notifications.* (Operational alerts)
Result of a scheduled run The scheduling recipients On finishing, according to the mode ecenter.scheduling.notifications.* (Scheduling)

They all carry the Auto-Submitted: auto-generated header, so that mail systems do not reply with vacation messages. Operations and scheduling notices begin their subject with [Empowerment Center] and can have their own sender (ecenter.operations.notifications.from and ecenter.scheduling.notifications.from); if they do not, they use the general one.

The subscriptions and alerts of all the owners of a connection can be seen in Scheduling › Subscriptions and alerts (see Scheduling).

Check that mail goes out#

  1. In Administration › Operations, open the Policies tab: in Email notifications, Mail server says Configured or Not configured (spring.mail.host).
  2. With active subscriptions or data alerts, the console checks the mail server in each alert round and opens the critical alert No mail server if it does not respond (see Mail and notices). Check now, in the Alerts tab, launches the round right away.
  3. To test a real send, click Send me a test on a subscription: you receive it, at your email address.

An email of a delivery that fails because the server does not respond is retried after 5 and after 30 seconds (ecenter.distribution.mail-retries). If a send runs out of retries, its other emails are tried once, without waiting again. The operations console opens the Failing deliveries alert with 3 failed sends or evaluations in an hour.

If the email does not arrive#

What happens What to look at
No email goes out Policies says Not configured (spring.mail.host): SPRING_MAIL_HOST is missing, or it is empty (an empty variable counts as defined).
No mail server alert The server does not respond: the machine, the port, the firewall or the encryption (STARTTLS or smtps) are not what it expects.
Failing deliveries alert The history of the subscription or the alert gives the reason for each failed send.
A user receives nothing They have no email address in their record, or their domain is not in ecenter.distribution.allowed-domains.
The link arrives instead of the attachment The attachment exceeds ecenter.distribution.max-attachment (10 MB by default), or the installation only sends links (ecenter.distribution.attachments: false).
A subscription or an alert has been paused It has failed 3 times in a row because of a system error; its owner has received the notice. Fix the cause and resume it.
The links in the emails do not work The public address, ECENTER_PUBLIC_URL, is missing.

See also Troubleshooting.

Test with Mailpit#

In a development or test environment it is better not to send real email. Mailpit is an SMTP server that stores the email without delivering it and shows it on a web page.

  • With the development environment (./mvnw spring-boot:run), ECenter starts Mailpit by itself (in backend/compose.yaml) and sends it the email. It is read at http://localhost:58025.
  • In another installation, start a Mailpit container (axllent/mailpit) and point SPRING_MAIL_HOST and SPRING_MAIL_PORT at it (its SMTP port is 1025).

To test the No mail server alert, with an active subscription, stop Mailpit and click Check now in the console: the alert opens; when you start it again, it is resolved.

See also#