From 89dd3292807b90b9df0a54d3ee22ffa0cbb8ad65 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 23 Sep 2022 15:44:33 +0200 Subject: [PATCH 1/3] fix notifications config --- services/notifications/pkg/command/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/notifications/pkg/command/server.go b/services/notifications/pkg/command/server.go index 5387cbbbe3..892205355f 100644 --- a/services/notifications/pkg/command/server.go +++ b/services/notifications/pkg/command/server.go @@ -55,7 +55,7 @@ func Server(cfg *config.Config) *cli.Command { logger.Fatal().Err(err).Str("addr", cfg.Notifications.RevaGateway).Msg("could not get reva client") } - svc := service.NewEventsNotifier(evts, channel, logger, gwclient, cfg.Commons.MachineAuthAPIKey, cfg.Notifications.EmailTemplatePath) + svc := service.NewEventsNotifier(evts, channel, logger, gwclient, cfg.Notifications.MachineAuthAPIKey, cfg.Notifications.EmailTemplatePath) return svc.Run() }, } From e4dc458b3e6ef64e480ae1e2714c642e49cb2924 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 26 Sep 2022 08:25:01 +0200 Subject: [PATCH 2/3] remove extra <> --- services/notifications/pkg/channels/channels.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/notifications/pkg/channels/channels.go b/services/notifications/pkg/channels/channels.go index a86fff60d9..1003c45989 100644 --- a/services/notifications/pkg/channels/channels.go +++ b/services/notifications/pkg/channels/channels.go @@ -118,7 +118,7 @@ func (m Mail) SendMessage(userIDs []string, msg, subject, senderDisplayName stri email := mail.NewMSG() if senderDisplayName != "" { - email.SetFrom(fmt.Sprintf("%s via owncloud <%s>", senderDisplayName, m.conf.Notifications.SMTP.Sender)).AddTo(to...) + email.SetFrom(fmt.Sprintf("%s via %s", senderDisplayName, m.conf.Notifications.SMTP.Sender)).AddTo(to...) } else { email.SetFrom(m.conf.Notifications.SMTP.Sender).AddTo(to...) } From 840df9c14217c92ac456575def258983cc87a8eb Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 26 Sep 2022 08:30:09 +0200 Subject: [PATCH 3/3] add changelog --- changelog/unreleased/fix-notifications-email-settings.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changelog/unreleased/fix-notifications-email-settings.md diff --git a/changelog/unreleased/fix-notifications-email-settings.md b/changelog/unreleased/fix-notifications-email-settings.md new file mode 100644 index 0000000000..afbf22c764 --- /dev/null +++ b/changelog/unreleased/fix-notifications-email-settings.md @@ -0,0 +1,7 @@ +Bugfix: Fix notifications service settings + +We've fixed two notifications service setting: +- `NOTIFICATIONS_MACHINE_AUTH_API_KEY` was previously not picked up (only `OCIS_MACHINE_AUTH_API_KEY` was loaded) +- If you used a email sender address in the format of the default value of `NOTIFICATIONS_SMTP_SENDER` no email could be send. + +https://github.com/owncloud/ocis/pull/4652