diff --git a/modules/setting/log.go b/modules/setting/log.go index 5e2d2d769..2cc95f11b 100644 --- a/modules/setting/log.go +++ b/modules/setting/log.go @@ -128,7 +128,11 @@ func generateLogConfig(sec *ini.Section, name string, defaults defaultLogOptions logConfig["username"] = sec.Key("USER").MustString("example@example.com") logConfig["password"] = sec.Key("PASSWD").MustString("******") logConfig["host"] = sec.Key("HOST").MustString("127.0.0.1:25") - logConfig["sendTos"] = sec.Key("RECEIVERS").MustString("[]") + sendTos := strings.Split(sec.Key("RECEIVERS").MustString(""), ",") + for i, address := range sendTos { + sendTos[i] = strings.TrimSpace(address) + } + logConfig["sendTos"] = sendTos logConfig["subject"] = sec.Key("SUBJECT").MustString("Diagnostic message from Gitea") }