Hi,
I am using turbine 2.2 b 1 in *standalone* mode and am having troubles using
VelocityHTMLEmail Class.
To create a new Instance of VelocityHtmlEmail RunData is required.
How do I obtain RunData?
I had a look at getRunData() method in RunDataFactory.
I can't use this method, because, I am not developing a web-app and don't have a
request and response .
Are there any code samples of using VelocityHtmlEmail outside a web app?
When I create a VelocityHtmlEmail with RunData as null
// RunData data =null; VelocityHtmlEmail ve = new VelocityHtmlEmail(data);
I get a NullPointerException as method getContext assumes RunData !=null
Exception in thread "main" java.lang.NullPointerException
at org.apache.turbine.util.velocity.VelocityHtmlEmail.getContext(Velocit
yHtmlEmail.java:271)
at org.apache.turbine.util.velocity.VelocityHtmlEmail.send(VelocityHtmlE
mail.java:179)
at SendEmail.sendVelHTMLEmail(SendEmail.java:75)
at SendEmail.<init>(SendEmail.java:24)
at SendEmail.main(SendEmail.java:81)
Is it possible to use VelocityHtmlEmail outside a web app? (comments in the source
code say that it is possible, but don't talk about this problem)
Thanks
Anmol