String activeLink = host + requestContext.getRequestContextPath() + "/public/" + portalName + "?"
+ ComponentURL.PORTAL_COMPONENT_ID + "=UIPortal&portal:action=RecoveryPasswordAndUsername&tokenId="
+ tokenId;
String mailText = headerMail + "\n" + activeLink + footerMail;
try {
mailSrc.sendMessage(res.getString("UIForgetPassword.mail.from"), email,
res.getString("UIForgetPassword.mail.subject"), mailText);
} catch (Exception e) {
requestContext.getUIApplication().addMessage(
new ApplicationMessage("UIForgetPassword.msg.send-mail-fail", null));
requestContext.addUIComponentToUpdateByAjax(uilogin);