The negotiator features a notification service for notifying representatives, admins and researchers about various events tied to a Negotiation.
Currently, it's implemented using SpringMail.
To configure the Spring Mail, set the following environment variables or update the properties file for the appropriate profile:
SPRING_MAIL_HOST="smtp.example"
SPRING_MAIL_PORT=1025
SPRING_MAIL_USERNAME="user"
SPRING_MAIL_PASSWORD="pass"
Templates ensure consistent and automated communications for various functions.
We are using Thymeleaf as the template engine, the email templates are stored in the resources/templates/
directory.
Automates the sending of emails based on schedules. The email reminder service is implemented using Spring's Task Execution and Scheduling.
The reminder service is configured in the application-prod.yml
file.
reminder:
trigger-duration-days: "P7D"
cron-schedule-expression: "0 0 0 * * TUE"
For development, we advise to use a service called Mailhog. It serves to test sending email messages and acts as a mock smtp server. For setup, follow the instructions mentioned in their documentation.