Hi Marc

In the JAMES.conf.xml file you'll see sections <mailetpackages> and
<matcherpackages>. If you create a new mailet or a matcher you need to add
your package in there - it's pretty obvious how to do it - so
com.yourDomain.mailets etc. Sounds like you've just got a new mailet, not
a matcher, so you won't need to do both. The transport processor section
is the right place - other than this I think you're setup is correct.

HTH

Steve

http://www.runtime-collective.com
t: 01273 234290
f: 01273 234291
m: 0789 984 1684

On Fri, 18 May 2001, Marc Chamberlin wrote:

> 
> Hello -
> 
> (I didn't get a response when I sent this query to the james-user mailing list, so 
>now I will ask if one of you james developer guru's ;-) will be willing to give me a 
>hand?)
> 
> What is the process for creating a custom mailet and installing it into James? I am 
>trying to create a custom mailet which will intercept certain emails sent to a 
>special user and process those emails in a special fashion. So far I have figured 
>that I have to insert a specification for the mailet in the James.conf.xml file, 
>though I wasn't sure exactly where... The xml specification I came up with is as 
>follows -
> 
>                 <!-- Is the recipient is NWAG and the subject is for the NWAG 
>Newsletter, save it to a special place -->
>                     <mailet match="SubjectIs=NWAG Newsletter" 
>class="NWAGNewsletterMailet">
>                     </mailet>
> 
> and I took a guess and placed this specification at the beginning of the transport 
>processor section of the James.conf.xml file. 
> 
> Next, I created my Java class for NWAGNewsletterMailet which is a derived class from 
>the GenericMailet class, and I exported this class in its own Jar file. 
> 
> Am I on the right track so far? Now I am not sure how to proceed.... It appears to 
>me, that there is some sort of special class loader application that the James/Avalon 
>code is using to load these mailets, but I couldn't find any documentation on how it 
>is done.... Where do I place the Jar file containing my mailet class, and how do I 
>specify that it is to be loaded... I tried the trick of adding the jar file to the 
>CLASSPATH environment variable within the run.bat startup file for the James server, 
>but that didn't work... 
> 
> Thanks for any help that can be offered, I know I am working a bit in the dark 
>here.... If there is some documentation somewhere that describes this process, just 
>point me to it, I am quite good at reading the manuals! ;-)
> 
>     Marc..
> 
> 
> 
> 
>----------------------------------------------------------------------------------------------------------------
> A man said unto the universe -  "Sir, I exist!"
> "However," replied the universe  "I do not see where that creates in me a sense of 
>an obligation."
>           - Stephen Crane
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to