Map<String, String> params = this.prepareMailParams(profile, token, reactivationPageCode);
this.sendAlert(config.getReactivationTemplates(), params, profile);
}
private void sendAlert(Map<String, Template> templates, Map<String, String> params, IUserProfile profile) throws ApsSystemException {
IUserRegConfig config = this.getConfig();
String[] eMail = { this.getFieldValue(profile, SystemConstants.USER_PROFILE_ATTRIBUTE_ROLE_MAIL) };
Template template = null;
String langCode = this.getFieldValue(profile, JpUserRegSystemConstants.ATTRIBUTE_ROLE_LANGUAGE);
if (langCode!=null) {
template = templates.get(langCode);
}
if (template==null) {
template = templates.get(this.getLangManager().getDefaultLang().getCode());
}
String subject = template.getSubject();
String text = this.replaceParams(template.getBody(), params);
this.getMailManager().sendMail(text, subject, eMail, null, null, config.getEMailSenderCode());
}