mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-09 15:28:37 -05:00
Merge pull request #4652 from wkloucek/notifications-config-fix
fix notifications config
This commit is contained in:
7
changelog/unreleased/fix-notifications-email-settings.md
Normal file
7
changelog/unreleased/fix-notifications-email-settings.md
Normal file
@@ -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
|
||||
@@ -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...)
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user