Ajay Chitre ha scritto:
I am able to get this working.. I think.. need to do some more testing.. but
here's what I had to do:
I noticed that, once I send a message to Spool, all the Mail attributes get
lost. MailImpl constructor re-initializes all of them.
MailImpl.setAttributesRaw() is not exposed via Mail interface, so I figured
using Mail.setAttribute isn't going to help me.
When I looked at the 'store' method of AvalonMailRepository, it looks like
the only object that gets persisted is the MimeMessage, so decided to save
the 'Retry Count' in that object as a header value - something like...
AFAIKT mail attributes are persisted in repository.
AvalonMailRepository.store() calls or.put(key, mc);
mc is a MailImpl and has a "private void
writeObject(java.io.ObjectOutputStream out) throws IOException" method.
mail.getMessage().addHeader(RETRY_COUNT, retries + "");
You get the idea..! How's this approach... good/bad/ugly? Please let me
know. Thanks.
It must work with attributes.
In fact we use attributes to store delivery exception in RemoteDelivery
and the attributes are used by DSNBounce to create an appropriate
bounce, so they simply work.
Make sure your attributes are Serializable.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]