Hello,
In our application, under certain error conditions, we would like to retry X
number of times after say every Y number of minutes and then if the error
still persists, ghost the message. I searched the Mail archives, and
noticed that some people are writing special code to handle this, but
e you take the mail
from the main spool and put it in your "retrying" spool. RemoteDelivery
also spit each Mail in multiple mails based on the recipients domains,
but maybe you don't need this and just need to store the message to your
retrying spool.
public void run() is the
another spool (named outgoing in this case) and then start a pool of threads
> dealing with delivery for this.
>
> public void service(Mail mail) is the method where you take the mail from
> the main spool and put it in your "retrying" spool. RemoteDelivery also spit
> eac
meone please point me in the right direction?
> >
> > No built in way, yet.
> >
> > The easiest way is to start from RemoteDelivery code and write your own
> > logic.
> >
> > Half of RemoteDelivery code deal with placing the mail to be processed in
> >
e writing special code to handle this, but
>> most
>> >> of these messages are more than a year old.
>> >>
>> >> Thought by now this functionality might be built into James. I looked
>> at
>> >> the docs, but couldn't find anything
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 exp
Ajay Chitre ha scritto:
I got busy with other issues, so I didn't get time to look at this for a
while.
Anyway, as per Stefano's suggestion I started from RemoteDelivery and I am
able to use most of the relevant code; but our 'process' logic is a bit
different. This is what we would like to do:
Stefano,
You are *absolutely* correct! The Mail attributes get persisted and remain
intact when the message is re-delivered. There was some other exception I
was getting that was wiping them out... long story :)
Anyway, I have changed my process to use the Mail attributes now, and it
seems to w