@ -47,7 +47,7 @@ func SendTestMail(email string) error {
// SendUserMail sends a mail to the user
// SendUserMail sends a mail to the user
func SendUserMail ( c * macaron . Context , u * User , tpl base . TplName , code , subject , info string ) {
func SendUserMail ( c * macaron . Context , u * User , tpl base . TplName , code , subject , info string ) {
data := map [ string ] interface { } {
data := map [ string ] interface { } {
"Username" : u . DisplayName ( ) ,
"DisplayName" : u . DisplayName ( ) ,
"ActiveCodeLives" : base . MinutesToFriendly ( setting . Service . ActiveCodeLives , c . Locale . Language ( ) ) ,
"ActiveCodeLives" : base . MinutesToFriendly ( setting . Service . ActiveCodeLives , c . Locale . Language ( ) ) ,
"ResetPwdCodeLives" : base . MinutesToFriendly ( setting . Service . ResetPwdCodeLives , c . Locale . Language ( ) ) ,
"ResetPwdCodeLives" : base . MinutesToFriendly ( setting . Service . ResetPwdCodeLives , c . Locale . Language ( ) ) ,
"Code" : code ,
"Code" : code ,
@ -79,7 +79,7 @@ func SendResetPasswordMail(c *macaron.Context, u *User) {
// SendActivateEmailMail sends confirmation email to confirm new email address
// SendActivateEmailMail sends confirmation email to confirm new email address
func SendActivateEmailMail ( c * macaron . Context , u * User , email * EmailAddress ) {
func SendActivateEmailMail ( c * macaron . Context , u * User , email * EmailAddress ) {
data := map [ string ] interface { } {
data := map [ string ] interface { } {
"Username" : u . DisplayName ( ) ,
"DisplayName" : u . DisplayName ( ) ,
"ActiveCodeLives" : base . MinutesToFriendly ( setting . Service . ActiveCodeLives , c . Locale . Language ( ) ) ,
"ActiveCodeLives" : base . MinutesToFriendly ( setting . Service . ActiveCodeLives , c . Locale . Language ( ) ) ,
"Code" : u . GenerateEmailActivateCode ( email . Email ) ,
"Code" : u . GenerateEmailActivateCode ( email . Email ) ,
"Email" : email . Email ,
"Email" : email . Email ,
@ -101,7 +101,8 @@ func SendActivateEmailMail(c *macaron.Context, u *User, email *EmailAddress) {
// SendRegisterNotifyMail triggers a notify e-mail by admin created a account.
// SendRegisterNotifyMail triggers a notify e-mail by admin created a account.
func SendRegisterNotifyMail ( c * macaron . Context , u * User ) {
func SendRegisterNotifyMail ( c * macaron . Context , u * User ) {
data := map [ string ] interface { } {
data := map [ string ] interface { } {
"Username" : u . DisplayName ( ) ,
"DisplayName" : u . DisplayName ( ) ,
"Username" : u . Name ,
}
}
var content bytes . Buffer
var content bytes . Buffer