return FreeMarkerTemplateUtils.processTemplateIntoString(configuration.getTemplate(templateName), templateData);
} catch (IOException e) {
if (log.isDebugEnabled()) {
log.error("Error parsing email template" + templateName, e);
}
throw new EmailException("Username reminder: error parsing email template" + templateName);
} catch (TemplateException e) {
if (log.isDebugEnabled()) {
log.error("failed to render email template " + templateName, e);
}
throw new EmailException("Username reminder: error rendering email template: " + templateName);
}
}