public class ForgottenLoginMailer extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_MACRO
Forgotten login active status
|
static String |
EMAIL_MACRO
Forgotten login email macro key.
|
static String |
FIRSTNAME_MACRO
Forgotten login firstname macro key.
|
static String |
LASTNAME_MACRO
Forgotten login lastname macro key.
|
static String |
PASSWORD_MACRO
Deprecated.
|
static String |
RESET_LINK_MACRO
Forgotten login link macro key.
|
static String |
USERNAME_MACRO
Forgotten login username macro key.
|
Constructor and Description |
---|
ForgottenLoginMailer(MailManager mailManager,
I18nHelper i18nHelper,
MailTemplateRenderer mailTemplateRenderer)
Constructs a new instance of ForgottenLoginMailer.
|
Modifier and Type | Method and Description |
---|---|
String |
checkActiveUser(User user) |
void |
mailResetPasswordLink(User user,
String resetLink)
Mails the reset password link to the
user . |
void |
mailUsernames(User user,
List<String> usernames)
Mails the list of usernames to the
user . |
public static final String USERNAME_MACRO
public static final String FIRSTNAME_MACRO
public static final String LASTNAME_MACRO
@Deprecated public static final String PASSWORD_MACRO
public static final String RESET_LINK_MACRO
public static final String EMAIL_MACRO
public static final String ACTIVE_MACRO
public ForgottenLoginMailer(MailManager mailManager, I18nHelper i18nHelper, MailTemplateRenderer mailTemplateRenderer)
mailManager
- manager used to send emailsi18nHelper
- internationalisation helpermailTemplateRenderer
- resolver used to replace macros with valuespublic void mailResetPasswordLink(User user, String resetLink) throws InvalidEmailAddressException, MailSendException
user
.user
- user to emailresetLink
- link to set a new passwordIllegalArgumentException
- if user
or resetLink
is nullInvalidEmailAddressException
- if the email address returned by user.getEmailAddress()
is not a valid email addressMailSendException
- if the email cannot be sentpublic void mailUsernames(User user, List<String> usernames) throws InvalidEmailAddressException, MailSendException
user
. The list of usernames
must not be empty.user
- user to emailusernames
- list of usernames associated with the emailIllegalArgumentException
- if user
or usernames
is null or empty.InvalidEmailAddressException
- if the email address returned by user.getEmailAddress()
is not a valid email addressMailSendException
- if the email cannot be sentCopyright © 2020 Atlassian. All rights reserved.