« An IMAP proxy server to speed up IMAP side full text search | Main | CPSWorkflow Documentation »

Jun 14, 2005

Asynchronous SMTP Mail sender inspired from Zope 3

Background

CPSMailAccess let the user configure the SMTP server he or she wants to use. It can be the same SMTP server for all users, or a different one for each user. Having multiple configuration can sound overkill, but since the application let you browse any mailbox, you might need to associate a different SMTP server to each MailBox

What Zope 3 provides

Zope 3 introduces a pretty cool mechanism: a delivery queue that writes mails into a filesystem dir (a MailDir in fact) and let a thread send them asynchronously.

This is rock-solid, since :

  • the work can restart even if Zope hangs: no send will be lost
  • the user does not wait

that's exactly what's needeed for large scale intranets. The pattern used is:

  • MailWriter: writes mails into the folder
  • MailReader: thread, sends mails found into the folder
  • MailSender: interface,provide a send method that calls MailWriter, and creates the MailDir

Special headers are inserted in the mail, so extra informations can be shared between the MailWriter and the MailSender.

What CPSMailAccess needs

The only missing feature for CPSMailAccess is to add the SMTP host and port informations into mails that are written into the MailDir.

Those are read by the sender and removed before the mail is sent.

The beta 2 version will include this feature, with a MailWriter-MailReader-MailSender pattern derived from Zope 3 classes.

And thanks to Zope 3 pythonic style, this module can be used in any Python application.

(Post originally written by Tarek Ziadé on the old Nuxeo blogs.)

Comments

About Us

We're the friendly employees of Nuxeo, a leading open source software vendor, which develops a complete Enterprise Content Management (ECM) software platform to help companies better produce, process, publish, archive, expose and find their information from digital assets to transactional documents.

» Follow us @nuxeo (Twitter)

» Connect on LinkedIn

» Visit Nuxeo.com

 

Customize & Configure
Nuxeo • Studio

Nuxeo • DM
Online Trial

Nuxeo • DM
Download

Nuxeo • DAM
Download

Nuxeo Connect support