Fix issue: synchronize the section name[mailer/email] of app.ini (#7704)

pull/7706/head
bitebyte 2024-03-27 10:30:25 +08:00 committed by GitHub
parent 895e553e68
commit e1e75ed36b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -339,13 +339,13 @@ func InstallPost(c *context.Context, f form.Install) {
}
if len(strings.TrimSpace(f.SMTPHost)) > 0 {
cfg.Section("mailer").Key("ENABLED").SetValue("true")
cfg.Section("mailer").Key("HOST").SetValue(f.SMTPHost)
cfg.Section("mailer").Key("FROM").SetValue(f.SMTPFrom)
cfg.Section("mailer").Key("USER").SetValue(f.SMTPUser)
cfg.Section("mailer").Key("PASSWD").SetValue(f.SMTPPasswd)
cfg.Section("email").Key("ENABLED").SetValue("true")
cfg.Section("email").Key("HOST").SetValue(f.SMTPHost)
cfg.Section("email").Key("FROM").SetValue(f.SMTPFrom)
cfg.Section("email").Key("USER").SetValue(f.SMTPUser)
cfg.Section("email").Key("PASSWD").SetValue(f.SMTPPasswd)
} else {
cfg.Section("mailer").Key("ENABLED").SetValue("false")
cfg.Section("email").Key("ENABLED").SetValue("false")
}
cfg.Section("server").Key("OFFLINE_MODE").SetValue(com.ToStr(f.OfflineMode))
cfg.Section("auth").Key("REQUIRE_EMAIL_CONFIRMATION").SetValue(com.ToStr(f.RegisterConfirm))