updated code

This commit is contained in:
rajesh
2024-10-11 17:20:35 +05:30
parent 9c4a5f3ee5
commit 3102300f64

View File

@@ -714,8 +714,11 @@ public class ApplicationDao {
String subject = Utils.replacePlaceholders(systemEmailTemplateResponse.getSubject(), subjectPlaceholders); String subject = Utils.replacePlaceholders(systemEmailTemplateResponse.getSubject(), subjectPlaceholders);
String body = Utils.replacePlaceholders(systemEmailTemplateResponse.getHtmlContent(), bodyPlaceholders); String body = Utils.replacePlaceholders(systemEmailTemplateResponse.getHtmlContent(), bodyPlaceholders);
String email = userEntity.getEmail();
mailUtil.sendByMailGun(subject, body, List.of(userEntity.getEmail()), null); if (userEntity.getBeneficiary() != null) {
email = userEntity.getBeneficiary().getEmail();
}
mailUtil.sendByMailGun(subject, body, List.of(email), null);
mailUtil.sendByMailGun(subject, body, List.of(applicationEntity.getCompany().getEmail()), null); mailUtil.sendByMailGun(subject, body, List.of(applicationEntity.getCompany().getEmail()), null);
} }