StringTemplate textTemplate = textTemplateFactory.getStringTemplate();
textTemplate.put("account", from);
StringTemplate bodyTemplate = new LocalStringTemplate(invitationBody);
for (Invitee invitee : to) {
bodyTemplate.put("invitee", invitee);
textTemplate.put("body", bodyTemplate.render());
String token = tokenGenerator.generateKey();
textTemplate.put("acceptUrl", acceptUriTemplate.expand(token));
send(from, invitee, textTemplate.render(), token);
}
}