Email Template Library in Java

Maksim picture Maksim · Jul 24, 2009 · Viewed 11k times · Source

I know that there is a library called FreeMarker to create Email templates for Java. Do you think this library is suitable to use in enterprise projects? Is there any other libraries to create email template for java?

Answer

Brian Agnew picture Brian Agnew · Jul 24, 2009

Freemarker works well, and is very powerful. Velocity has a simpler syntax, is somewhat less powerful, and is a lot more forgiving wrt. nulls (variables not being populated).

I've used both, and Velocity is very easy to get started with. Freemarker (despite its stricter implementation) offers a lot more in terms of 'correctness' and facilities.