diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-03 12:51:53 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-03 12:51:53 -0400 |
commit | 63baf76ab2f4a510b4fb981e81feb5ae533b1639 (patch) | |
tree | f3f3c26c3a02e4d30399b6b039bc96e1dcd48a5a /modules | |
parent | 9c3aa6936acc16a4b127874dea5a5519d20e44e1 (diff) | |
download | gitea-63baf76ab2f4a510b4fb981e81feb5ae533b1639.tar.gz gitea-63baf76ab2f4a510b4fb981e81feb5ae533b1639.zip |
Fix #214
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mailer/mail.go | 2 | ||||
-rw-r--r-- | modules/setting/setting.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/modules/mailer/mail.go b/modules/mailer/mail.go index 6e34439e15..4ebabae818 100644 --- a/modules/mailer/mail.go +++ b/modules/mailer/mail.go @@ -26,7 +26,7 @@ func NewMailMessageFrom(To []string, from, subject, body string) Message { // Create New mail message use MailFrom and MailUser func NewMailMessage(To []string, subject, body string) Message { - return NewMailMessageFrom(To, setting.MailService.User, subject, body) + return NewMailMessageFrom(To, setting.MailService.From, subject, body) } func GetMailTmplData(user *models.User) map[interface{}]interface{} { diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 8cca57efed..2f64511a12 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -330,6 +330,7 @@ func newSessionService() { type Mailer struct { Name string Host string + From string User, Passwd string } @@ -363,6 +364,7 @@ func newMailService() { User: Cfg.MustValue("mailer", "USER"), Passwd: Cfg.MustValue("mailer", "PASSWD"), } + MailService.From = Cfg.MustValue("mailer", "FROM", MailService.User) log.Info("Mail Service Enabled") } |