public ResetPasswordMailer(MailManager mailManager) {
this.mailManager = mailManager;
}
public void sendEmail(final String emailAddress, final String pwd) {
mailManager.sendMail(emailAddress, SUBJECT, String.format(BODY_TEMPLATE, pwd), new MessagingExceptionHandler() {
@Override
public void handleMessagingException(MessagingException e) {
logger.info("An password reset email could not be sent to %s. The password was reset to %s.",
emailAddress,
pwd);