Mm.. Is there a reason you wouldn't just have the imap attributes in the emit tag to stay close to standard?
E.g <emit source="imap_mailboxes" host="imap://user:[email protected]"> &_.name; &_.recent; &_.exists<br /> </emit> <else> <redirect to="/wrongcredentials.htm" /> </else> I would also expect the emit tag to throw auth error messages without the else.. David Hunter. On 14/01/09 9:22 PM, "Marc Dirix" <[email protected]> wrote: > I'm still working on a imap module for Roxen (without internal > pre-defined layouting). > > Currently I'm deciding which way to ga with the roxen module, as basic > Client in pike stands. Maybe you can give me your thoughts on these two > questions. > > 1) To container or not. > Basically I need some kind of mechanism to connect to the server if > the connection is not in the cache. I'm thinking I can go 2 ways. Either > use a container or not. See below 2 rxml examples: > example 1 > <imap user="bla" password="foo" connectionid=""> > <emit source="imap_mailboxes"> > &_.name; &_.recent; &_.exists<br /> > </emit> > </imap> > <else> > <redirect to="/wrongcredentials.htm" /> > </else> > > example 2 > > <imap user="bla" password="foo" connectionid="theid" /> > <else> > <redirect to="/wrongcredentials.htm" /> > </else> > <emit source="imap_mailboxes" connectionid="theid" > > &_.name; &_.recent; &_.exists<br /> > </emit> > > So the second example leaves more freedom, but I think the first is more > controlled? What is your opinion? > > Second Question, I want to use some kind of connectionid to cache the > connection. Should the connectionid either always be giving by the RXML > page, or should the imap module enforce an id by means of the sessionid > (internal), or am I missing some obvious direction here? > If the module enforces the sessionid, it is obvious only one imap > connection can be used per browser. Using more has no current business > case for me, but if it is easy to do then why not? > > Best regards, > > Marc Dirix >
