Class ForgottenLoginMailer

java.lang.Object
com.atlassian.crowd.manager.mailer.reminder.ForgottenLoginMailer

public class ForgottenLoginMailer extends Object
Helper class to perform mailing tasks for forgotten login.
  • Constructor Details

    • ForgottenLoginMailer

      public ForgottenLoginMailer(MailManager mailManager, I18nHelper i18nHelper, MailTemplateRenderer mailTemplateRenderer, EmailMessageFactory emailMessageFactory)
      Constructs a new instance of ForgottenLoginMailer.
      Parameters:
      mailManager - manager used to send emails
      i18nHelper - internationalisation helper
      mailTemplateRenderer - resolver used to replace macros with values
  • Method Details

    • mailResetPasswordLink

      public void mailResetPasswordLink(User user, String resetLink) throws com.atlassian.crowd.exception.InvalidEmailAddressException, MailSendException
      Mails the reset password link to the user.
      Parameters:
      user - user to email
      resetLink - link to set a new password
      Throws:
      IllegalArgumentException - if user or resetLink is null
      com.atlassian.crowd.exception.InvalidEmailAddressException - if the email address returned by user.getEmailAddress() is not a valid email address
      MailSendException - if the email cannot be sent
    • mailUsernames

      public void mailUsernames(User user, List<String> usernames) throws com.atlassian.crowd.exception.InvalidEmailAddressException, MailSendException
      Mails the list of usernames to the user. The list of usernames must not be empty.
      Parameters:
      user - user to email
      usernames - list of usernames associated with the email
      Throws:
      IllegalArgumentException - if user or usernames is null or empty.
      com.atlassian.crowd.exception.InvalidEmailAddressException - if the email address returned by user.getEmailAddress() is not a valid email address
      MailSendException - if the email cannot be sent
    • checkActiveUser

      public String checkActiveUser(User user)