summaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-09 16:10:31 +0800
committerUnknwon <u@gogs.io>2015-07-09 16:10:31 +0800
commita2a9e151f8e6d0968035b61d034704fb7b34d3e5 (patch)
tree4e5ef858502ec3af0eefcc5aedc065d402a02513 /routers/install.go
parentb9dc2147b43667d39fd6e61027e84c51aad6485c (diff)
downloadgitea-a2a9e151f8e6d0968035b61d034704fb7b34d3e5.tar.gz
gitea-a2a9e151f8e6d0968035b61d034704fb7b34d3e5.zip
install - add mail from setting
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/install.go b/routers/install.go
index 4b3e68cdd4..7a951ad27a 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -124,6 +124,7 @@ func Install(ctx *middleware.Context) {
// E-mail service settings
if setting.MailService != nil {
form.SMTPHost = setting.MailService.Host
+ form.SMTPFrom = setting.MailService.From
form.SMTPEmail = setting.MailService.User
}
form.RegisterConfirm = setting.Service.RegisterEmailConfirm
@@ -245,6 +246,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
if len(strings.TrimSpace(form.SMTPHost)) > 0 {
cfg.Section("mailer").Key("ENABLED").SetValue("true")
cfg.Section("mailer").Key("HOST").SetValue(form.SMTPHost)
+ cfg.Section("mailer").Key("FROM").SetValue(form.SMTPFrom)
cfg.Section("mailer").Key("USER").SetValue(form.SMTPEmail)
cfg.Section("mailer").Key("PASSWD").SetValue(form.SMTPPasswd)
} else {