Class ForgottenLoginMailer
java.lang.Object
com.atlassian.crowd.manager.mailer.reminder.ForgottenLoginMailer
Helper class to perform mailing tasks for forgotten login.
-
Constructor Summary
ConstructorsConstructorDescriptionForgottenLoginMailer(MailManager mailManager, I18nHelper i18nHelper, MailTemplateRenderer mailTemplateRenderer, EmailMessageFactory emailMessageFactory) Constructs a new instance of ForgottenLoginMailer. -
Method Summary
Modifier and TypeMethodDescriptioncheckActiveUser(User user) voidmailResetPasswordLink(User user, String resetLink) Mails the reset password link to theuser.voidmailUsernames(User user, List<String> usernames) Mails the list of usernames to theuser.
-
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 emailsi18nHelper- internationalisation helpermailTemplateRenderer- 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 theuser.- Parameters:
user- user to emailresetLink- link to set a new password- Throws:
IllegalArgumentException- ifuserorresetLinkis nullcom.atlassian.crowd.exception.InvalidEmailAddressException- if the email address returned byuser.getEmailAddress()is not a valid email addressMailSendException- 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 theuser. The list ofusernamesmust not be empty.- Parameters:
user- user to emailusernames- list of usernames associated with the email- Throws:
IllegalArgumentException- ifuserorusernamesis null or empty.com.atlassian.crowd.exception.InvalidEmailAddressException- if the email address returned byuser.getEmailAddress()is not a valid email addressMailSendException- if the email cannot be sent
-
checkActiveUser
-