From 63baf76ab2f4a510b4fb981e81feb5ae533b1639 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 3 Jun 2014 12:51:53 -0400 Subject: [PATCH] Fix #214 --- gogs.go | 2 +- modules/mailer/mail.go | 2 +- modules/setting/setting.go | 2 ++ templates/VERSION | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gogs.go b/gogs.go index 8e8c161a5c..cf35af7543 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.4.1.0602 Alpha" +const APP_VER = "0.4.1.0603 Alpha" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) 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") } diff --git a/templates/VERSION b/templates/VERSION index 6e7780b2e4..7f97ea1c45 100644 --- a/templates/VERSION +++ b/templates/VERSION @@ -1 +1 @@ -0.4.1.0602 Alpha \ No newline at end of file +0.4.1.0603 Alpha \ No newline at end of file