Class PasswordResetMailer

java.lang.Object
com.ericbouchut.learndev.auth.PasswordResetMailer

@Component public class PasswordResetMailer extends Object
Sends the password-reset email. In development the message is caught by Mailpit (web UI: http://localhost:8025); nothing leaves the machine.
  • Constructor Details

    • PasswordResetMailer

      public PasswordResetMailer(org.springframework.mail.javamail.JavaMailSender mailSender, @Value("${learndev.mail.from}") String from, @Value("${learndev.password-reset.token-ttl}") Duration tokenTtl)
  • Method Details

    • sendResetEmail

      public void sendResetEmail(String to, String resetLink)
      Parameters:
      to - recipient email address
      resetLink - absolute URL containing the RAW token; the raw token exists only in this email and in the URL bar, never in the database or the logs