This commit is contained in:
iiuazz
2014-09-12 15:39:28 +08:00
parent bfcf8ec547
commit adf59976ec
3 changed files with 10 additions and 4 deletions

View File

@ -2,6 +2,7 @@ package service
import (
"gopkg.in/mgo.v2/bson"
"github.com/revel/revel"
"github.com/leanote/leanote/app/db"
"github.com/leanote/leanote/app/info"
. "github.com/leanote/leanote/app/lea"
@ -31,7 +32,8 @@ func (this *PwdService) FindPwd(email string) (ok bool, msg string) {
}
// 发送邮件
url := "http://leanote.com/findPassword/" + token
siteUrl, _ := revel.Config.String("site.url")
url := siteUrl + "/findPassword/" + token
body := fmt.Sprintf("请点击链接修改密码: <a href='%v'>%v</a>. %v小时后过期.", url, url, int(overHours));
if !SendEmail(email, "leanote-找回密码", "找回密码", body) {
return false, "邮箱发送失败"