> Serge Knystautas writes:
> > Christophe Laumond wrote:
> > Are there any way to verify that the emails has been
> > sent succesfully so I can create a receipt email like
> > this? I thougt a bit about modifying the LocalDelivery
> > and RemoteDelivery mailets and store the state
> > information there but I am not really sure whether
> > this is the way to go.
>
> Yes, this would be the way to do it. There is currently no hook
> capability to run code upon successful delivery completion.
Rather than hack the existing code, would you not extend the
LocalDelivery and RemoteDelivery classes, override the service() method,
call super(), then do your accounting? From the API:
<quote>
public void service(Mail mail)
throws AddressException
For this message, we take the list of recipients, organize these
into distinct servers, and duplicate the message for each of these
servers, and then call the deliver (messagecontainer) method for each
server-specific messagecontainer ... that will handle storing it in the
outgoing queue if needed.
</quote>
The above description mentions "queueing if needed", so it is not clear
to me that you can know the mail has actually left the jurisdiction of
James or not. In the event that it is asychronous (outgoing mail queues
up, not really "leaving yet" because unreachable hosts, etc.), then your
original bulk mailet cannot afford to stick around waiting for the
"accounting" to be done by your modified/extended LocalDelivery and
RemoteDelivery mailets. It could literally take days for some remote
deliveries to finally go out if the destination host is unreachable.
I suppose the actual sources (or a James expert) can tell if it behaves
asynchronously or synchronously. The notes from the javadocs imply that
it is asych, which would be problematic for this approach.
-broc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]