Let us say that you have an application that includes an e-mail notification system. Essentially when certain application specific events happen, certain users are automatically notified by e-mail about these events. We have such an application and wanted to include the e-mail verification as part of the accepance test-suite.
TestableEmailer is a product that grew out of this need. It is a thin wrapper around MailHost that allows for a “test mode”. When this mode is turned on, rather than sending the mail through the Mail Host the product stores all the information in the email. This can be retrieved later and assertions made against what is expected from that e-mail.
TestableEmailer has been built using Five interfaces and views. It has been tested on Zope 2.8.6.