From 34e74e4554333324b9bca08aecbf2255d14f8ce3 Mon Sep 17 00:00:00 2001 From: Bastian Beier <34065050+bastianbeier@users.noreply.github.com> Date: Thu, 9 Jan 2025 17:40:53 +0100 Subject: [PATCH] docs: Improve readme for grouped email notifications Co-authored-by: Martin --- services/notifications/README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/notifications/README.md b/services/notifications/README.md index c3b912baf..af93508e0 100644 --- a/services/notifications/README.md +++ b/services/notifications/README.md @@ -46,9 +46,15 @@ Custom email templates referenced via `NOTIFICATIONS_EMAIL_TEMPLATE_PATH` must a The `templates/html` subfolder contains a default HTML template provided by ocis. When using a custom HTML template, hosted images can either be linked with standard HTML code like ```logo-mail``` or embedded as a CID source ```logo-mail```. In the latter case, image files must be located in the `templates/html/img` subfolder. Supported embedded image types are png, jpeg, and gif. Consider that embedding images via a CID resource may not be fully supported in all email web clients. -## Grouped Emails +## Sending Grouped Emails -The `notifications` service also supports grouped emails on a daily and weekly basis. The event IDs are stored using the `Store` interface. To send the grouped emails the CLI command `notifications send-email` has to be used. +The `notification` service can initiate sending emails based on events stored in the configured store that are grouped into a `daily` or `weekly` bucket. These groups contain events that get populated e.g. when the user configures `daily` or `weekly` email notifications in his personal settings in the web UI. If a user does not define any of the named groups for notification events, no event is stored. + +Grouped events are stored for the TTL defined in `OCIS_PERSISTENT_STORE_TTL`. This TTL can either be configured globally or individually for the notification service via the `NOTIFICATIONS_STORE_TTL` envvar. + +Grouped events that have passed the TTL are removed automatically without further notice or sending! + +To initiate sending grouped emails like via a cron job, use the `ocis notifications send-email` command. Note that the command mandatory requires at least one option which is `--daily` or `--weekly`. Note that both options can be used together. ### Storing