log.debug("body template: " + this.correspondenceSettings.getBodyTemplate());
}
String subject = templateEngine.merge( model, this.correspondenceSettings.getSubjectTemplate() );
String body = templateEngine.merge( model, this.correspondenceSettings.getBodyTemplate() );
if(log.isDebugEnabled())log.debug("Subject: " + subject + " body: " + body);
CorrespondenceMessage message = new CorrespondenceMessage();
if (f.getOrgnr() != null)
message.setOrgNr(f.getOrgnr());
else
message.setOrgNr(f.getFnr());
message.setMessageTitle( subject );
message.setMessageSummary( subject );
message.setMessageBody( body );
message.setExternalReference( f.getId() );
return message;
}