Microservice to create notification emails for newly received messages in berichtencentrum. Fetches messages that need a notification to be sent, constructs email messages and places them in the correct outbox.
To add the service to your stack, add the following snippet to docker-compose.yml
:
services:
berichtencentrum-email-notification:
image: lblod/berichtencentrum-email-notification-service:latest
environment:
RUN_INTERVAL: 5
OUTBOX_FOLDER_URI: "http://data.lblod.info/id/mail-folders/2"
FROM_EMAIL_ADRESS: "Agentschap Binnenlands Bestuur Vlaanderen <noreply-binnenland@vlaanderen.be>"
LOKET_APP_BASEURL: "https://loket.lokaalbestuur.vlaanderen.be/"
Required environment variables:
FROM_EMAIL_ADDRESS
: The email address added in the 'from' header of the sent mail.LOKET_APP_BASEURL
: Base URL of the loket app (so we can supply a working link to the message mentioned in the email)OUTBOX_FOLDER_URI
: URI of the email outbox folder in which the prepared messages must be stored.
Optional environment variables:
-
MU_APPLICATION_GRAPH
-
MU_SPARQL_ENDPOINT
-
MU_SPARQL_UPDATEPOINT
-
BCC_EMAIL_ADDRESSES
: recipients off mails that should be in BCC. -
RUN_INTERVAL
: How frequent the service to send email notifications must run (in minutes), default: 5 -
MAX_MESSAGE_AGE
: Max age of the messages requested to the API (in days), default: 3. This value could theoretically be equal to that ofRUN_INTERVAL
, but a margin is advised to take eventual application or API downtime into account (to not miss any older messages).