the direct mailer in zope.sendmail can fail in the second phase of 2-phase commit.

Bug #177746 reported by Jim Fulton
2
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned
zope.sendmail
Invalid
Undecided
Unassigned

Bug Description

If an error occurs when sending mail using a direct mailer, then the error occurs during the second phase of 2-phase commit. This is considered a critical failure by the transaction system. A properly-deployed production application should wake people up when critical errors occur.

Transactional email is, at best, a compromise. It would be better, however, to generate errors during the first phase of two-phase commit.

(Arguably, it would be better to use queued mail and have some out-of-band channel to get errors back to the user. Unfortunately, no such channel exists currently, and would be somewhat tricky to use if it did exists. Queued-mail without a mechanism to notify users of errors is unacceptable if actually delivering mail is important.)

A simpler fix is to swap tpc_finish and tpc_vote methods in zope.sendmail. The hard part is writing the test. :)

Tres Seaver (tseaver)
Changed in zope3:
status: New → Won't Fix
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope.sendmail project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope.sendmail.

Changed in zope.sendmail:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.