diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-22 20:27:13 +0800 |
---|---|---|
committer | Thomas Boerger <thomas@webhippie.de> | 2016-12-22 13:27:13 +0100 |
commit | e0ecd9fd93c5e59bd4ad1d10acacb13420ff5301 (patch) | |
tree | 3a5b3257e1f641d62bb68b06510aaf040e79b251 /modules | |
parent | 65b1875d2bba97130f2796fe915f2a342ef7869c (diff) | |
download | gitea-e0ecd9fd93c5e59bd4ad1d10acacb13420ff5301.tar.gz gitea-e0ecd9fd93c5e59bd4ad1d10acacb13420ff5301.zip |
fix bug #1122 log.smtp receiver configure error (#3602) (#451)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/setting/setting.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 9c00eb7437..c8809f998a 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -686,11 +686,11 @@ func newLogService() { sec.Key("PROTOCOL").In("tcp", []string{"tcp", "unix", "udp"}), sec.Key("ADDR").MustString(":7020")) case "smtp": - LogConfigs[i] = fmt.Sprintf(`{"level":%s,"username":"%s","password":"%s","host":"%s","sendTos":"%s","subject":"%s"}`, level, + LogConfigs[i] = fmt.Sprintf(`{"level":%s,"username":"%s","password":"%s","host":"%s","sendTos":["%s"],"subject":"%s"}`, level, sec.Key("USER").MustString("example@example.com"), sec.Key("PASSWD").MustString("******"), sec.Key("HOST").MustString("127.0.0.1:25"), - sec.Key("RECEIVERS").MustString("[]"), + strings.Replace(sec.Key("RECEIVERS").MustString("example@example.com"), ",", "\",\"", -1), sec.Key("SUBJECT").MustString("Diagnostic message from serve")) case "database": LogConfigs[i] = fmt.Sprintf(`{"level":%s,"driver":"%s","conn":"%s"}`, level, |