Hi Math,

The mailet processing occurs in the "spooling", before the mail is persisted in the mailbox. The spooling currently relies on activemq jms queue, with kahadb persistence.

Why do you need access to the database id of the mail?
If you need it to access access james db from another application, the best way is to use the mailbox API.
This will allow you to access mailbox and mails, in an higher level way.
Your code will we ok even with maildir, jcr,... persistence.

Another approach would be to develop some custom events upon mail persistence, but I find this option more difficult and more intrusive.

Tks,

Eric


On 9/02/2011 18:10, math math wrote:
Hi Norman,
Thanks for your answer but this is'nt exactly what i wanted.
The method mail.getMessage().getMessageID() gives me the value of the field
Message-ID in the "header" table (something like<4D10BB78.6060406@127.0.0.1
).
I was'nt clear but what I need is the MESSAGE_ID field (an Integer, same as
message.id field)  corresponding to the entring mail in my mailet.
Is it possible to have it before the mail has been stored in the db?if yes,
how to do it?

Thx,
Mat.
.

2011/2/9 Norman<nor...@apache.org>

Am 09.02.2011 16:28, schrieb math math:

  Hi everyone,
I'm working with james3M2 and developping a custom mailet.
I would like to know how to get a message ID, from Message table....? how
and where is it calculated? is it possible to get it when the mail pass
through my mailet?
Thx,
Mat.


Hi there,

you can access the MessageID in your Mailet via.

mail.getMessage().getMessageID();

See:

http://download.oracle.com/javaee/1.3/api/javax/mail/internet/MimeMessage.html#getMessageID%28%29

Bye,
Norman

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to