Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix notifications config #4652

Merged
merged 3 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog/unreleased/fix-notifications-email-settings.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion services/notifications/pkg/channels/channels.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
}
Expand Down
2 changes: 1 addition & 1 deletion services/notifications/pkg/command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
},
}
Expand Down