I am using Play and I have a simple EmailService class that renders a few objects in a Play template. Here is my code:
Content html = views.html.acceptedEmail.render(incomingUBD,relatedUBD,rule);
email = new Email().setFrom("noreply@elemica.com")
.setTo(rule.getSuccessEmailValues())
.setSubject(rule.getFailureNotificationSubject())
.setBodyHtml(html.toString());
I'm wondering if it's possible to pass in the acceptedEmail template as a variable value so that the template I'm applying could change dynamically based on what value I was passing into the EmailService (Java) class this code is coming from.
I'm fairly new to Scala templating so apologies if the question is a little out there or if more information is required.
Aucun commentaire:
Enregistrer un commentaire