summaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-19 09:24:02 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-19 09:24:02 -0400
commita2fbb246151ce722a30d932dd73a9ecc76b020e9 (patch)
treea356ce201ddf77a0b9c2511c36781735a4ce515d /modules/auth
parentde087c7b4a31cb0643d5432ec9d6b26e208baff2 (diff)
downloadgitea-a2fbb246151ce722a30d932dd73a9ecc76b020e9.tar.gz
gitea-a2fbb246151ce722a30d932dd73a9ecc76b020e9.zip
Add active page
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/mail.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/auth/mail.go b/modules/auth/mail.go
index cdfcce4f99..3de18b677b 100644
--- a/modules/auth/mail.go
+++ b/modules/auth/mail.go
@@ -39,3 +39,20 @@ func SendRegisterMail(user *models.User) {
// async send mail
mailer.SendAsync(msg)
}
+
+// Send email verify active email.
+func SendActiveMail(user *models.User) {
+ code := CreateUserActiveCode(user, nil)
+
+ subject := "Verify your email address"
+
+ data := mailer.GetMailTmplData(user)
+ data["Code"] = code
+ body := base.RenderTemplate("mail/auth/active_email.html", data)
+
+ msg := mailer.NewMailMessage([]string{user.Email}, subject, body)
+ msg.Info = fmt.Sprintf("UID: %d, send email verify mail", user.Id)
+
+ // async send mail
+ mailer.SendAsync(msg)
+}