Sure there is.. But to be honest I would not do this as you will
always need to look out for db changes etc. So I think the prefered
way would be to inject an instance of MailboxManager in your custom
app and store the mails via it. Or is this not possible ?

Bye,
Norman


2011/1/19 Luc Saulière <[email protected]>:
> Hello,
> I'm developing with Math on the same mail app. We didn't succeed in storing
> mail as james3 does. In fact the SieveMailet class does not have a
> setUsersRepo method, I think you're dealing with a newer version of
> James3...
> We are developing with the M2 one and SieveMailet have a setMailserver
> method instead.
> So, is there any way to store a mail (from another IMAP connection for
> instance) in the James3 mySQL db, as James3 does (i.e. filling correctly all
> the appropriate tables...)?
>
> Thx for helping.
> Luc.
>
> 2011/1/17 Eric Charles <[email protected]>
>
>> Hi,
>> The mails store magic occurs in LocalDelivery where the MailboxManager is
>> injected.
>> (more precise, LocalDelivery uses the SieveMailet initialized with the
>> MailboxManager)
>>        sieveMailet.setUsersRepository(usersRepository);
>>        sieveMailet.setMailboxManager(mailboxManager);
>>        sieveMailet.init(m);
>>        sieveMailet.setQuiet(true);
>> ...
>>        if (mail.getState() != Mail.GHOST) {
>>            sieveMailet.service(mail);
>>        }
>>
>> You only need to know that *MailRepository is not for users' mail storage
>> http://james.apache.org/server/3/feature-persistence.html
>>
>> Both topics (mailet usage for delivery + separate mail stores) are subject
>> to discussion will certainly change.
>>
>> Tks,
>>
>> Eric
>>
>>
>>
>> On 17/01/2011 11:43, math math wrote:
>>
>>> Hello everybody,
>>>
>>> I am developping a web mail project using james 3M2. I'm trying to store
>>> mails in a "james3" way with an external application using MySql DB. I've
>>> tried to store mails using mysq database repositories for a few days now
>>> but
>>> i didn't succeed to do so... I 've traced the store method of
>>> JDBCMailRepository class and also the ToRepository one. But still don't
>>> know
>>> how James 3 is storing mails in the DB.
>>>
>>> I would be very glad if someone could help me in this task.
>>>
>>> Thanks,
>>> Mat
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> 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