Thanks Steve, I think I pretty much had the JAMES.conf.xml file figgured
out, it was the integration of my mailet jar file that I was having trouble
with.... I think I now got it figured out also, and would like to pass along
a suggestion to the James developers to make the following change (or
something simular) to the James run.bat file.... It would have helped me a
lot, to quickly understand what I needed to do, and it shouldn't hurt anyone
who doesn't use any custom mailets... So here is my version of run.bat -

@echo off
echo Avalon runner
rem add custom mailet jars to then end of the MAILET_PATH, for example
rem SET MAILET_PATH=../lib/mailet.jar;../lib/myNewMailets.jar;
SET MAILET_PATH=../lib/mailet.jar;
SET CLASSPATH=%CLASSPATH%;%MAILET_PATH%
set
LOCAL_CLASSPATH=Loader.jar;../lib/AvalonAware.jar;../lib/xerces.jar;../lib/m
ail_1_2.jar;../lib/activation.jar
java -cp "%CLASSPATH%;%LOCAL_CLASSPATH%" org.apache.avalon.loader.Main



It was figuring out that I needed to also add the supplied mailet.jar file
to my CLASSPATH that threw me! ;-)   Marc....




----- Original Message -----
From: "Steve Crossan" <[EMAIL PROTECTED]>
To: "james-dev" <[EMAIL PROTECTED]>
Sent: Saturday, May 19, 2001 2:39 AM
Subject: Re: How do I install a mailet?


> 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]
>


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

Reply via email to