Skip to content

Commit

Permalink
Fix for new user mail content (#2213)
Browse files Browse the repository at this point in the history
Signed-off-by: muralibasani <[email protected]>
Co-authored-by: muralibasani <[email protected]>
  • Loading branch information
muralibasani and muralibasani authored Jan 17, 2024
1 parent 3f1439b commit b8108ce
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions core/src/main/java/io/aiven/klaw/service/MailUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ void sendMail(String username, String pwd, HandleDbRequests dbHandle, String log
formattedStr = String.format(newUserAdded, username, pwd);
subject = "Access to Klaw";

sendMail(username, dbHandle, formattedStr, subject, false, false, null, tenantId, loginUrl);
sendMail(
username, dbHandle, formattedStr, subject, false, false, null, tenantId, loginUrl, false);
}

void sendMailResetPwd(
Expand Down Expand Up @@ -416,7 +417,8 @@ void sendMailRegisteredUserSaas(
false,
registerUserInfo.getMailid(),
tenantId,
loginUrl);
loginUrl,
true);
}

void sendMailRegisteredUser(
Expand Down Expand Up @@ -459,7 +461,8 @@ void sendMailRegisteredUser(
false,
registerUserInfo.getMailid(),
tenantId,
loginUrl);
loginUrl,
true);
} catch (Exception e) {
log.error(registerUserInfo.toString(), e);
}
Expand Down Expand Up @@ -505,7 +508,8 @@ private void sendMail(
boolean requiresApproval,
String otherMailId,
int tenantId,
String loginUrl) {
String loginUrl,
boolean copyTeam) {

CompletableFuture.runAsync(
() -> {
Expand Down Expand Up @@ -540,7 +544,9 @@ private void sendMail(
log.debug("emailId: {} Team: {}", emailId, emailIdTeam);

CollectionUtils.addIgnoreNull(to, emailId);
CollectionUtils.addIgnoreNull(to, emailIdTeam);
if (copyTeam) {
CollectionUtils.addIgnoreNull(to, emailIdTeam);
}
emailService.sendSimpleMessage(
to, cc, allApprovers, subject, formattedStr, tenantId, loginUrl);
} else {
Expand Down

0 comments on commit b8108ce

Please sign in to comment.