You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Gusnadi Kevin <gu...@ncs.com.sg> on 2010/04/20 06:19:19 UTC

Manually execute SQL statement from Mailet

Hi Guys . 

Is there a way for me to call SQL query defined in sqlResources.xml and
executes that sql query from within my custom Mailet ?

Thanks and regards
Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Manually execute SQL statement from Mailet

Posted by Norman Maurer <no...@googlemail.com>.
Hi Kevin,

yes its possible. Now it depends on which version you are using of
james. With version 2.3.x its a bit more "clumpy" then with james
trunk (development version)..

For 2.3.x see this code for an example:
http://svn.apache.org/viewvc/james/server/branches/v2.3/src/java/org/apache/james/transport/mailets/BayesianAnalysis.java?view=markup

For development:
http://svn.apache.org/viewvc/james/server/trunk/mailets/src/main/java/org/apache/james/transport/mailets/BayesianAnalysis.java?view=markup


Hope it helps..

Bye,
Norman

2010/4/20 Gusnadi Kevin <gu...@ncs.com.sg>:
> Hi Guys .
>
> Is there a way for me to call SQL query defined in sqlResources.xml and
> executes that sql query from within my custom Mailet ?
>
> Thanks and regards
> Kevin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org