Hello (again),
I added your suggestion:
VelocityHtmlEmail vemail = new VelocityHtmlEmail(data);
Context ctx = /TurbineVelocity.getContext/(data); /
ctx.put/("vmail", vemail); /
ctx.put/("bestellung", oData);
/vemail.addTo/("emailaddress", "Sven Richter");
///data.getUser/().getEmail());
/vemail.setFrom/("Recipient", "emailaddress");
/vemail.setHtmlTemplate/("portlets/html//email-confirm.vm/"); /
vemail.send/();
In that segment I put the oData-Objekt into the context, which I use to
get data from the database. Now I tried to reference that with
'$ctx.bestellung.id' (for example). But that didn't work (it stays
'$ctx.bestellung.id'). What did I do wrong?
Thanks a lot,
Sven.
Henning P. Schmiedehausen schrieb:
Sven Richter <[EMAIL PROTECTED]> writes:
Hello Shawn,
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]