Philip Tomlinson wrote:
Hi,
How can I get a MailContext from another thread other than a spool thread.

I have a scheduler which calls back in a separate thread of execution and from this thread
I want to be able to send an email.

You have to work with the assembly.xml

Add the dependency "org.apache.mailet.MailetContext" to your scheduler component (it is provided by the James block).

You can then simply use the ServiceManager (in your component service() method) to lookup the MailetContext.

You have to add the dependency by declaring it in your component .xinfo file.

Stefano


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

Reply via email to