View more product versions
Browse some of our most popular communities and join the social business conversation today!
View all user communities
Learn more about Jive Product and Service offerings from the leader in social business.
View all product communities
Meet people in your local area interested to talk about Jive, social business, and business value.
View more regional groups
Find people with similar interests and share ideas on how to apply social technologies.
View more interest groups
Learn about all things Jive and social business with our Jive Community blogs.
View other blog posts
I am trying to use the JiveFreemarkerManager class in my content type. I created the file mail_template_i18n_en_US.xml and put it in my resources directory.
I have attached my mail_template_i18n_en_US.xml. The template name is <template name="sev1.update.email" displayName="Urgent Email Update">.
using the following code:
JiveFreemarkerManager freemarkerManager = JiveApplication.getContext().getFreemarkerManager();
String templateName = "sev1.update.email";
SimpleHash hash = new SimpleHash();hash.put("ticket", ticket);
String docURL = JiveResourceResolver.getJiveObjectURL(ticket, true);hash.put("contentURL", docURL);hash.put("user", ticket.getLastUpdatedUser());hash.put("container", ticket.getContainer());
Locale locale = new Locale("en_US");
htmlMail = TemplateUtil.applyFreemarkerTemplate(hash, templateName, locale);
However I am getting the error FileNotFound sev1.update.email:enUS
All I am trying to do is load an email template from within my plugin so I can send the email.
I have figured out what I was doing wrong. I was under the impresssion that applyFreemarkerTemplate applies to the complete template. It does not.
Once I changed
String templateBodyName = "sev1.update.email.body";
I was able to get the body of the email
Retrieving data ...