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);


-- 
Paul.

http://logicsquad.net/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to