diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-19 07:21:23 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-19 07:21:23 -0400 |
commit | fbbae2b721c04be740d67b9d227a7578030f93b9 (patch) | |
tree | 394b9bb1e2e3b36611d834027ecaf6ee34a8a41d /modules/mailer/mail.go | |
parent | 9a666f33773c5d8b66e9ab66598414f62bcfdc11 (diff) |
Working on register mail confirmation
Diffstat (limited to 'modules/mailer/mail.go')
-rw-r--r-- | modules/mailer/mail.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/mailer/mail.go b/modules/mailer/mail.go new file mode 100644 index 00000000..fe74af9e --- /dev/null +++ b/modules/mailer/mail.go @@ -0,0 +1,24 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package mailer + +import ( + "github.com/gogits/gogs/models" + "github.com/gogits/gogs/modules/base" +) + +func GetMailTmplData(user *models.User) map[interface{}]interface{} { + data := make(map[interface{}]interface{}, 10) + data["AppName"] = base.AppName + data["AppVer"] = base.AppVer + data["AppUrl"] = base.AppUrl + data["AppLogo"] = base.AppLogo + data["ActiveCodeLives"] = base.Service.ActiveCodeLives + data["ResetPwdCodeLives"] = base.Service.ResetPwdCodeLives + if user != nil { + data["User"] = user + } + return data +} |