G Pas
This commit is contained in:
parent
a0f779d9e2
commit
d749c615b3
1 changed files with 2 additions and 1 deletions
3
gpas.go
3
gpas.go
|
@ -65,9 +65,10 @@ func passwordLost(user User, config *ConfigFile, ldapConn *ldap.Conn) error {
|
|||
// if config.SMTPUsername != "" {
|
||||
// auth = sasl.NewPlainClient("", config.SMTPUsername, config.SMTPPassword)
|
||||
// }
|
||||
message := buf.Bytes()
|
||||
auth := smtp.PlainAuth("", config.SMTPUsername, config.SMTPPassword, config.SMTPServer)
|
||||
log.Printf("auth: %v", auth)
|
||||
err = smtp.SendMail(config.SMTPServer+":587", auth, config.SMTPUsername, []string{user.OtherMailbox}, buf)
|
||||
err = smtp.SendMail(config.SMTPServer+":587", auth, config.SMTPUsername, []string{user.OtherMailbox}, message)
|
||||
if err != nil {
|
||||
log.Printf("email send error %v", err)
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue