@Override
protected void prepareMessage(MimeMessageHelper helper,
Map<Object, Object> context) throws Exception {
Long eventId = (Long) context.get("eventId");
Event event = eventService.getEvent(eventId);
context.put("event", event);
context.put("site", event.getProject().getCategory().getSite());
//
String subject = FreeMarkerTemplateUtils.processTemplateIntoString(
configuration.getTemplate(TEMPLATE_EVENT_NOTIFY_SUBJECT), context);
String content = FreeMarkerTemplateUtils.processTemplateIntoString(
configuration.getTemplate(TEMPLATE_EVENT_NOTIFY_CONTENT), context);
helper.setSubject(subject);
helper.setText(content, true);
helper.addTo(event.getEnteredBy().getEmail(), event.getEnteredBy().getNickname());
}