diff --git a/mycollab-esb/src/main/java/com/mycollab/module/user/esb/ResetUserPasswordCommand.kt b/mycollab-esb/src/main/java/com/mycollab/module/user/esb/ResetUserPasswordCommand.kt index 3b5f5f3755..2d052f9a20 100644 --- a/mycollab-esb/src/main/java/com/mycollab/module/user/esb/ResetUserPasswordCommand.kt +++ b/mycollab-esb/src/main/java/com/mycollab/module/user/esb/ResetUserPasswordCommand.kt @@ -32,6 +32,7 @@ import com.mycollab.module.user.accountsettings.localization.UserI18nEnum import com.mycollab.module.user.service.UserService import org.slf4j.LoggerFactory import org.springframework.stereotype.Component +import java.util.* /** * @author MyCollab Ltd @@ -60,11 +61,9 @@ class ResetUserPasswordCommand(private val extMailService: ExtMailService, contentGenerator.putVariable("urlRecoveryPassword", recoveryPasswordURL) contentGenerator.putVariable("copyRight", LocalizationHelper.getMessage(locale, MailI18nEnum.Copyright, DateTimeUtils.getCurrentYear())) - val recipient = MailRecipientField(user.email, user.username) - val recipientFields = listOf(recipient) - + extMailService.sendHTMLMail(applicationConfiguration.notifyEmail, applicationConfiguration.siteName, - recipientFields, + Collections.singletonList(MailRecipientField(user.username, user.username)), LocalizationHelper.getMessage(locale, UserI18nEnum.MAIL_RECOVERY_PASSWORD_SUBJECT, applicationConfiguration.siteName), contentGenerator.parseFile("mailUserRecoveryPasswordNotifier.ftl", locale)) @@ -72,4 +71,4 @@ class ResetUserPasswordCommand(private val extMailService: ExtMailService, LOG.error("Can not reset the password of username $username because this user is not existed") } } -} \ No newline at end of file +} diff --git a/mycollab-services/src/main/java/com/mycollab/module/mail/DefaultMailer.kt b/mycollab-services/src/main/java/com/mycollab/module/mail/DefaultMailer.kt index 612842e7e3..35a6dfcb9a 100644 --- a/mycollab-services/src/main/java/com/mycollab/module/mail/DefaultMailer.kt +++ b/mycollab-services/src/main/java/com/mycollab/module/mail/DefaultMailer.kt @@ -45,7 +45,7 @@ class DefaultMailer(private val emailConf: EmailConfiguration) : IMailer { toEmail.forEach { when { isValidate(it.email) && isValidate(it.name) -> email.addTo(it.email, it.name) - else -> LOG.error("Invalid cc email input: ${it.email}---${it.email}") + else -> LOG.error("Invalid to email input: ${it.email}---${it.email}") } } @@ -59,7 +59,7 @@ class DefaultMailer(private val emailConf: EmailConfiguration) : IMailer { bccEmail?.forEach { when { isValidate(it.email) && isValidate(it.name) -> email.addBcc(it.email, it.name) - else -> LOG.error("Invalid cc email input: ${it.email}---${it.email}") + else -> LOG.error("Invalid bcc email input: ${it.email}---${it.email}") } } diff --git a/mycollab-web/src/main/java/com/mycollab/module/user/accountsettings/team/view/UserListViewImpl.java b/mycollab-web/src/main/java/com/mycollab/module/user/accountsettings/team/view/UserListViewImpl.java index 284d9abc78..279dfda732 100644 --- a/mycollab-web/src/main/java/com/mycollab/module/user/accountsettings/team/view/UserListViewImpl.java +++ b/mycollab-web/src/main/java/com/mycollab/module/user/accountsettings/team/view/UserListViewImpl.java @@ -164,7 +164,7 @@ private Component generateMemberBlock(SimpleUser member) { if (RegisterStatusConstants.NOT_LOG_IN_YET.equals(member.getRegisterstatus())) { MButton resendBtn = new MButton(UserUIContext.getMessage(UserI18nEnum.ACTION_RESEND_INVITATION), clickEvent -> { - SendUserInvitationEvent invitationEvent = new SendUserInvitationEvent(member.getUsername(), "", + SendUserInvitationEvent invitationEvent = new SendUserInvitationEvent(member.getUsername(), member.getPassword(), member.getInviteUser(), AppUI.getSubDomain(), AppUI.getAccountId()); AsyncEventBus asyncEventBus = AppContextUtil.getSpringBean(AsyncEventBus.class); asyncEventBus.post(invitationEvent);