|
|
@ -99,7 +99,7 @@ func Install(ctx *context.Context) { |
|
|
|
if setting.MailService != nil { |
|
|
|
if setting.MailService != nil { |
|
|
|
form.SMTPHost = setting.MailService.Host |
|
|
|
form.SMTPHost = setting.MailService.Host |
|
|
|
form.SMTPFrom = setting.MailService.From |
|
|
|
form.SMTPFrom = setting.MailService.From |
|
|
|
form.SMTPEmail = setting.MailService.User |
|
|
|
form.SMTPUser = setting.MailService.User |
|
|
|
} |
|
|
|
} |
|
|
|
form.RegisterConfirm = setting.Service.RegisterEmailConfirm |
|
|
|
form.RegisterConfirm = setting.Service.RegisterEmailConfirm |
|
|
|
form.MailNotify = setting.Service.EnableNotifyMail |
|
|
|
form.MailNotify = setting.Service.EnableNotifyMail |
|
|
@ -124,7 +124,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { |
|
|
|
ctx.Data["CurDbOption"] = form.DbType |
|
|
|
ctx.Data["CurDbOption"] = form.DbType |
|
|
|
|
|
|
|
|
|
|
|
if ctx.HasError() { |
|
|
|
if ctx.HasError() { |
|
|
|
if ctx.HasValue("Err_SMTPEmail") { |
|
|
|
if ctx.HasValue("Err_SMTPUser") { |
|
|
|
ctx.Data["Err_SMTP"] = true |
|
|
|
ctx.Data["Err_SMTP"] = true |
|
|
|
} |
|
|
|
} |
|
|
|
if ctx.HasValue("Err_AdminName") || |
|
|
|
if ctx.HasValue("Err_AdminName") || |
|
|
@ -279,7 +279,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { |
|
|
|
cfg.Section("mailer").Key("ENABLED").SetValue("true") |
|
|
|
cfg.Section("mailer").Key("ENABLED").SetValue("true") |
|
|
|
cfg.Section("mailer").Key("HOST").SetValue(form.SMTPHost) |
|
|
|
cfg.Section("mailer").Key("HOST").SetValue(form.SMTPHost) |
|
|
|
cfg.Section("mailer").Key("FROM").SetValue(form.SMTPFrom) |
|
|
|
cfg.Section("mailer").Key("FROM").SetValue(form.SMTPFrom) |
|
|
|
cfg.Section("mailer").Key("USER").SetValue(form.SMTPEmail) |
|
|
|
cfg.Section("mailer").Key("USER").SetValue(form.SMTPUser) |
|
|
|
cfg.Section("mailer").Key("PASSWD").SetValue(form.SMTPPasswd) |
|
|
|
cfg.Section("mailer").Key("PASSWD").SetValue(form.SMTPPasswd) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
cfg.Section("mailer").Key("ENABLED").SetValue("false") |
|
|
|
cfg.Section("mailer").Key("ENABLED").SetValue("false") |
|
|
|