On 07/18/2012 02:44 PM, Dinyar Rabady wrote:
Hi!

I am currently using James to relay mails. Some of those are not relayed but 
stored in both a repository and as an .eml file. I would now like to be able to 
insert these stored mails into James again in order to be sent.

I would do this by moving the Repository objects or .emls into another folder which would 
be watched by James. To do so I have found the "fromRepository" Mailet. Now it 
isn't clear to me how this is used. Does it check the repository only at startup or after 
receiving an Email?

The FromRepository mailet is like any other mailet, it is invoked when a mail arrive in the spooling system of James (via SMTP).

So, you need to play with the mailetcontainer processors, e.g.:
- Define your FromRepository mailet in a processor which is invoked on specific condition (a mail sent to a specific address). - All mails from the repository will be 'respooled' to the processor you will define. - In that last processor, you can imagine storing the mails in yet another repo, or do whatever you want.


Another related question: Is it somehow possible to retrieve the name used to 
store the name of the stored Repository object?

You mean the name of the mail? Yes, we have Mail.getName() but you will need to code it in your own mailet.


Best,
Dinyar



--
eric | http://about.echarles.net | @echarles


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to