Skip to main content

Zope sendmail

Project description

zope.sendmail is a package for email sending from Zope 3 applications. Email sending from Zope 3 applications works as follows:

A Zope 3 application locates a mail delivery utility (IMailDelivery) and feeds a message to it. It gets back a unique message ID so it can keep track of the message by subscribing to IMailEvent events.

The utility registers with the transaction system to make sure the message is only sent when the transaction commits successfully. (Among other things this avoids duplicate messages on ConflictErrors.)

If the delivery utility is a IQueuedMailDelivery, it puts the message into a queue (a Maildir mailbox in the file system). A separate process or thread (IMailQueueProcessor) watches the queue and delivers messages asynchronously. Since the queue is located in the file system, it survives Zope restarts or crashes and the mail is not lost. The queue processor can implement batching to keep the server load low.

If the delivery utility is a IDirectMailDelivery, it delivers messages synchronously during the transaction commit. This is not a very good idea, as it makes the user wait. Note that transaction commits must not fail, but that is not a problem, because mail delivery problems dispatch an event instead of raising an exception.

However, there is a problem – sending events causes unknown code to be executed during the transaction commit phase. There should be a way to start a new transaction for event processing after this one is commited.

An IMailQueueProcessor or IDirectMailDelivery actually delivers the messages by using a mailer (IMailer) component that encapsulates the delivery process. There currently is only one mailer:

ISMTPMailer sends all messages to a relay host using SMTP.

If mail delivery succeeds, an IMailSentEvent is dispatched by the mailer. If mail delivery fails, no exceptions are raised, but an IMailErrorEvent is dispatched by the mailer.

Changes

3.4.0 (2007-08-20)

No changes since 3.4.0a1.

3.4.0a1 (2007-04-22)

Initial release as a separate project, corresponds to zope.sendmail from Zope 3.4.0a1.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zope.sendmail-3.4.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zope.sendmail-3.4.0-py2.4.egg (57.7 kB view details)

Uploaded Egg

File details

Details for the file zope.sendmail-3.4.0.tar.gz.

File metadata

  • Download URL: zope.sendmail-3.4.0.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zope.sendmail-3.4.0.tar.gz
Algorithm Hash digest
SHA256 fa8d69cc960c57ad7ea1a73f98ac982eb5a17d90b929d9f42da9b4657fff8991
MD5 12761345f4901ec8a976920d701e8bb2
BLAKE2b-256 f48f249bfd0bff601613f9659b92184e33bb269b27978cfe8663628ff85506c4

See more details on using hashes here.

File details

Details for the file zope.sendmail-3.4.0-py2.4.egg.

File metadata

File hashes

Hashes for zope.sendmail-3.4.0-py2.4.egg
Algorithm Hash digest
SHA256 09b72ae9084f7427cb483fddf24abb50ecc170738528960c196f26719677cccf
MD5 b049c063f1812290fd9c334f850a6d3a
BLAKE2b-256 a335e58bdc096a7220cd795652af7b6a234416d9d97c0271f3656afe904c8748

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page