// SendPasswordChanged sends an email notifying about a successful
// password change to the specified email address.
// Last parameter specifies whether the password was changed during
// the recovery process or not.
SendPasswordChanged sends an email notifying about a successful
password change to the specified email address.
Last parameter specifies whether the password was changed during
the recovery process or not.
// SendPasswordChanged sends an email notifying about a successful // password change to the specified email address . // Last parameter specifies whether the password was changed during // the recovery process or not .
func (m *Manager) SendPasswordChanged(ctx context.Context, eml string, recov bool) {
	var (
		e    hermes.Email
		subj string
	)
	if recov {
		subj = "Password successfully reset"
		e = hermes.Email{
			Body: hermes.Body{
				Title: "Password was successfully reset.",
				Intros: []string{
					"You can log in to your account any time with your new password.",
				},
			},
		}
	} else {
		subj = "Password changed"
		e = hermes.Email{
			Body: hermes.Body{
				Title: "Password changed.",
				Intros: []string{
					"You can log in to your account any time with your new password.",
				},
			},
		}
	}
	eBody, err := m.herm.GenerateHTML(e)
	if err != nil {
		logutil.Critical(m.log, err).Msg("cannot generate password changed email")
		return
	}
	m.send(ctx, eml, subj, eBody)
}
func ( m * Manager ) SendPasswordChanged ( ctx context . Context , eml string , recov bool ) { var ( e hermes . Email subj string ) if recov { subj = " " e = hermes . Email { Body : hermes . Body { Title : " " , Intros : [ ] string { " " , } , } , } } else { subj = " " e = hermes . Email { Body : hermes . Body { Title : " " , Intros : [ ] string { " " , } , } , } } eBody , err := m . herm . GenerateHTML ( e ) if err != nil { logutil . Critical ( m . log , err ) . Msg ( " " ) return } m . send ( ctx , eml , subj , eBody ) }
SendPasswordChanged sends an email notifying about a successful
password change to the specified email address.
SendPasswordChanged sends an email notifying about a successful password change to the specified email address .