Configuring the ecos-notifications Microservice Connection
To send emails to users, the ecos-notifications microservice must be configured to connect to an SMTP server.
These parameters are set in the service configuration (spring properties) and are typically configured not through the UI but during application deployment: for example, via application.yml, environment variables, Docker Compose, Helm chart, or another configuration method.
Below is a configuration example for mail.ru.
Via application.yml:
spring:
mail:
host: smtp.mail.ru
port: 587
username: user@mail.ru
password: 12345
properties:
mail:
smtp:
auth: true
starttls:
enable: true
ecos-notifications:
email:
from:
fixed: user@mail.ru
Or the same via environment variables:
SPRING_MAIL_HOST=smtp.mail.ru
SPRING_MAIL_PORT=587
SPRING_MAIL_USERNAME=user@mail.ru
SPRING_MAIL_PASSWORD=12345
SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH=true
SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE=true
ECOS_NOTIFICATIONS_EMAIL_FROM_FIXED=user@mail.ru