Re: Component based email without a context

2011-10-31 Thread Ken Anderson
That's perfect! Thanks Philippe! Ken On Oct 30, 2011, at 2:15 PM, Philippe Rabier wrote: > Hi Ken, > > We use the following code to do what you want: > > … > NSMutableDictionary headers = new NSMutableDictionary(); > headers.setObjectForKey(new NSArray(language), "accept-language"); > > // W

Re: Component based email without a context

2011-10-30 Thread Philippe Rabier
Hi Ken, We use the following code to do what you want: … NSMutableDictionary headers = new NSMutableDictionary(); headers.setObjectForKey(new NSArray(language), "accept-language"); // WORequest will answer true when method request.isUsingWebServer() is called and so will use Host and Port heade

Re: Component based email without a context

2011-10-29 Thread Chuck Hill
I use this in tests: testContext = new WOContext(new WORequest("GET", "http://localhost/cgi-bin/WebObjects";, "HTTP/1.1", null, null, null)); Not sure offhand what additional information might be needed to generate your email content. Chuck On 2011-10-29, at 10:09 PM, Paul Hoadley wrote: >

Re: Component based email without a context

2011-10-29 Thread Paul Hoadley
On 29/10/2011, at 10:42 PM, Ken Anderson wrote: > Thanks Paul. Unfortunately, currentContext() will return null, since this > will not be running inside a request/response loop. I'm probably just going > to create a context to use… Oh, sorry Ken. I obviously didn't read your original post cl

Re: Component based email without a context

2011-10-29 Thread Ken Anderson
Thanks Paul. Unfortunately, currentContext() will return null, since this will not be running inside a request/response loop. I'm probably just going to create a context to use… Ken On Oct 28, 2011, at 6:51 PM, Paul Hoadley wrote: > Hi Ken, > > On 26/10/2011, at 11:40 PM, Ken Anderson wrote

Re: Component based email without a context

2011-10-28 Thread Paul Hoadley
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? Thi

Component based email without a context

2011-10-28 Thread Ken Anderson
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? Thanks, Ken ___ Do not post