[Zope] sendmail not part of a transaction

Jim Fulton jim@digicool.com
Thu, 26 Aug 1999 08:39:12 -0400


"Jay, Dylan" wrote:
> 
> Not sure if this is a bug but I doubt it. If an exception occurs after a
> sendmail tag the mail is still sent. It should probably be part of a
> transaction.

Ideally, all operations should be transactional. This is difficult
to achiev for external systems without transaction support.  Still,
pseudo-transactional behavior can be achieved by delaying external
operations until transaction commits.  I think this is a good idea, 
especially if the probability of failure of the external system
is very low.  Of course, if a failure occurs in the external system
at commit time, it may not be possible to undo other operations. 
Similarly, it isn't possible to undo sending mail if an error occurs
when commiting to other external systems. Still, delaying email delivery 
would at least prevent email delivery when there are application
errors.

This would be a fun project for soeone interested in learning
more abut the transaction machinery.

Jim