Class EmailVerificationMailer

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

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

    • EmailVerificationMailer

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

    • sendVerificationEmail

      public void sendVerificationEmail(String to, String verifyLink)
      Parameters:
      to - recipient email address
      verifyLink - 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