diff --git a/controllers/account.go b/controllers/account.go index 88d542848..2df3d192b 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -246,6 +246,7 @@ func (c *AccountController) FindPassword() { data := map[string]interface{}{ "SITE_NAME": c.Option["SITE_NAME"], "url": c.BaseUrl() + beego.URLFor("AccountController.FindPassword", "token", member_token.Token, "mail", email), + "BaseUrl": c.BaseUrl(), } body, err := c.ExecuteViewPathTemplate("account/mail_template.tpl", data) diff --git a/mail/smtp.go b/mail/smtp.go index 423b3a8b3..9caef12f5 100644 --- a/mail/smtp.go +++ b/mail/smtp.go @@ -17,6 +17,7 @@ import ( "regexp" "strconv" "strings" + "github.com/astaxie/beego" ) var ( @@ -85,8 +86,8 @@ func (s *SMTPConfig) Auth() smtp.Auth { case "SSL": fallthrough default: - auth = smtp.PlainAuth(s.Identity, s.Username, s.Password, s.Host) - //auth = unencryptedAuth{smtp.PlainAuth(s.Identity, s.Username, s.Password, s.Host)} + //auth = smtp.PlainAuth(s.Identity, s.Username, s.Password, s.Host) + auth = unencryptedAuth{smtp.PlainAuth(s.Identity, s.Username, s.Password, s.Host)} } return auth } @@ -234,13 +235,20 @@ func (c *SMTPClient) SendTLS(m Mail, message bytes.Buffer) error { log.Println(err) return err } + + //if err := ct.StartTLS(tlsconfig);err != nil { + // log.Println("StartTLS Error:",err,c.host,c.port) + // return err + //} + //if err := ct.StartTLS(tlsconfig);err != nil { // fmt.Println(err) // return err //} fmt.Println(c.smtpAuth) - if ok,_ := ct.Extension("AUTH"); ok { + if ok,s := ct.Extension("AUTH"); ok { + beego.Info(s) // Auth if err = ct.Auth(c.smtpAuth); err != nil { log.Println("Auth Error:", diff --git a/views/account/find_password_setp1.tpl b/views/account/find_password_setp1.tpl index 3bea34b01..78c733de2 100644 --- a/views/account/find_password_setp1.tpl +++ b/views/account/find_password_setp1.tpl @@ -2,7 +2,7 @@
- + @@ -12,7 +12,7 @@ - + - + - - - + + + - + - + - + - - + + + diff --git a/views/errors/403.tpl b/views/errors/403.tpl index 064c79ad0..a600df45f 100644 --- a/views/errors/403.tpl +++ b/views/errors/403.tpl @@ -8,7 +8,7 @@