simplify admin email notifications

This commit is contained in:
Dmitry Verkhoturov
2020-10-20 11:02:04 -05:00
committed by Umputun
parent 91580194e9
commit 1ce3cf3d1f
8 changed files with 24 additions and 38 deletions
+3 -4
View File
@@ -457,10 +457,6 @@ func (s *ServerCommand) newServerApp() (*serverApp, error) {
ProxyCORS: s.ProxyCORS,
}
if s.Notify.Email.AdminNotifications {
srv.AdminEmail = s.Admin.Shared.Email
}
srv.ScoreThresholds.Low, srv.ScoreThresholds.Critical = s.LowScore, s.CriticalScore
var devAuth *provider.DevAuthServer
@@ -847,6 +843,9 @@ func (s *ServerCommand) makeNotify(dataStore *service.DataStore, authenticator *
return tkn, nil
},
}
if s.Notify.Email.AdminNotifications {
emailParams.AdminEmails = s.Admin.Shared.Email
}
smtpParams := notify.SMTPParams{
Host: s.SMTP.Host,
Port: s.SMTP.Port,