Re: Component based email without a context
Re: Component based email without a context
- Subject: Re: Component based email without a context
- From: Paul Hoadley <email@hidden>
- Date: Sat, 29 Oct 2011 09:21:01 +1030
Hi Ken,On 26/10/2011, at 11:40 PM, Ken Anderson wrote: I would like to be able send emails generated by components in the background without a user (or a context).
Does anyone have a chunk of code for creating a WOContext to be populated for generating email from a WOComponent?
This is how I do it (Wonder-based app):
SomeEmailComponent component = ERXApplication.erxApplication().pageWithName(SomeEmailComponent.class, (WOContext) ERXWOContext.currentContext().clone());
Then later:
ERMailDeliveryHTML mail = new ERMailDeliveryHTML(); mail.setComponent(component);
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden