Hello Henning,
thanks for your reply. The constructor
'org.apache.turbine.util.velocity.VelocityHtmlEmail(org.apache.velocity.context.Context
ctx)' doesn't seem to exist any longer (at least I get the corresponding
error message).
When I use 'Context ctx = TurbineVelocity.getContext(data); ', can I
refer to the variables in my context through '$ctx.variable' in the
template? Or did I misunderstand somethong?
Thanks a lot,
Sven.
Henning P. Schmiedehausen schrieb:
thanks for your reply. I'm using Jetspeed 1.6, so unfortunatly I can't
use that. By the way, where do you set the content-type to "text/html"?
If you are using Jetspeed 1.6, then you are using Turbine 2.x.
VelocityHtmlEmail vemail = new VelocityHtmlEmail(data);
Can you actually give us the package of the VelocityHtmlEmail that you
are using? Because in Turbine 2.x, there is a C'tor like this:
org.apache.turbine.util.velocity.VelocityHtmlEmail(org.apache.velocity.context.Context
ctx)
If you insist on using the C'tor which takes the RunData object, you
can get the context that is used to build the mail by using
Context ctx = TurbineVelocity.getContext(data);
But that way I can't use 'vemail.setContext(context);'. Because of that
I can't access the data from the database using '$bestellung' in the
template, which makes the whole thing useless to me.
Any idea?
From here, everything should be clear. You were simply looking in the
wrong place. This is not a Velocity question, it is a Turbine
question. ;-)
Best regards
Henning
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]