Map<String,Object> context = newHashMap(options.getContext());
context.put("toFullName", toName);
SMTPMailServer server = MailFactory.getServerManager().getDefaultSMTPMailServer();
Email email = new Email(toEmail);
email.setFrom(options.getFromEmail());
email.setFromName(options.getFromName());
email.setSubject(render(options.getSubjectTemplate(), context));
email.setBody(render(options.getBodyTemplate(), context));
if (options.getReplyToEmail() != null)
{
email.setReplyTo(options.getReplyToEmail());
}
server.send(email);
}
catch (MailException e)