Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install products.printingmailhost

How to install Products.PrintingMailHost

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install products.printingmailhost
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.7 Available View build log
Windows (64-bit)
0.7 Available View build log
Mac OS X (10.5+)
0.7 Available View build log
Linux (32-bit)
0.7 Available View build log
Linux (64-bit)
0.7 Available View build log
 
Author
License
GPL
Dependencies
Lastest release
version 0.7 on Jan 5th, 2011

PrintingMailHost

This is a hack. :)

This product, when installed, will check if Zope is running in debug mode, and if so, monkey patch (that is, grab the internals of, squeeze tight, then rip hard, just like monkeys do) Zope's MailHost class, meaning that any and all uses of a MailHost will be "fixed" so that instead of sending mail, it prints messages to the standard output.

This is useful if you don't have a local mailhost for testing, or if you prefer not to spam the crap out of yourself whilst finding out if your bulk mail script is working.

If Zope is not running in debug mode, it will not install itself. However, I wouldn't recommend putting it on a production site. You never know what those monkeys may get up to...

You can optionally enable the PrintingMailHost with an environment variable as of version 0.3. See the installation instructions for more information about how to use it.

Author

Martin Aspeli <optilude (AT) gmx (DOT) net> Initial idea, release management

Contributors

Dorneles Tremea <deo (AT) plonesolutions (DOT) com> Fixed to work both with old-style and new-style classes. Extended to also patch SecureMailBase from SecureMailHost, if available.

Clayton Parker <clayton (AT) sixfeetup (DOT) com>

Maurits van Rees <maurits (AT) vanrees (DOT) org>

Products.PrintingMailHost Installation

To install Products.PrintingMailHost into the global Python environment (or a workingenv), using a traditional Zope 2 instance, you can do this:

  • When you're reading this you have probably already run

System Message: WARNING/2 (<string>, line 49)

Bullet list ends without a blank line; unexpected unindent.

easy_install Products.PrintingMailHost. Find out how to install setuptools (and EasyInstall) here: http://peak.telecommunity.com/DevCenter/EasyInstall

Alternatively, if you are using zc.buildout and the plone.recipe.zope2instance recipe to manage your project, you can do this:

  • Add Products.PrintingMailHost to the list of eggs to install, e.g.:

    System Message: WARNING/2 (<string>, line 58)

    Literal block expected; none found.

[buildout] ... eggs = ... Products.PrintingMailHost

  • If you want to enable PrintingMailHost when debug-mode is off:

    System Message: WARNING/2 (<string>, line 66)

    Literal block expected; none found.

[instance] ... environment-vars = ... ENABLE_PRINTING_MAILHOST True

  • If you want to disable PrintingMailHost when debug-mode is on:

    System Message: WARNING/2 (<string>, line 74)

    Literal block expected; none found.

[instance] ... environment-vars = ... ENABLE_PRINTING_MAILHOST False

  • Re-run buildout in order to make any of the above changes active:

    System Message: WARNING/2 (<string>, line 82)

    Literal block expected; none found.

$ ./bin/buildout

Changelog

0.7 (2010-01-05)
  • Also patch (Secure)MaildropHost when available.

System Message: WARNING/2 (<string>, line 92)

Bullet list ends without a blank line; unexpected unindent.

[maurits]

0.6 (2010-01-05)
  • Allow passing keyword 'immediate'. Needed for Plone 4 compatibility.

System Message: WARNING/2 (<string>, line 99)

Bullet list ends without a blank line; unexpected unindent.

[maurits]

0.5 (2009-08-07)
  • Fix email Message import

System Message: WARNING/2 (<string>, line 106)

Bullet list ends without a blank line; unexpected unindent.

[claytron]

0.4 (2009-07-24)
  • Rough support for multipart email messages

System Message: WARNING/2 (<string>, line 113)

Bullet list ends without a blank line; unexpected unindent.

[iElectric]

0.3 (2009-03-22)
  • Decode base64 encoded email messages

System Message: WARNING/2 (<string>, line 120)

Bullet list ends without a blank line; unexpected unindent.

[claytron]

  • Added environment variable (ENABLE_PRINTING_MAILHOST) to enable

System Message: WARNING/2 (<string>, line 123)

Bullet list ends without a blank line; unexpected unindent.

or disable PrintingMailHost [claytron]

  • Update README and HISTORY.txt

System Message: WARNING/2 (<string>, line 127)

Bullet list ends without a blank line; unexpected unindent.

[claytron]

0.2 (2008-08-20)
  • Release as an egg to PyPi

System Message: WARNING/2 (<string>, line 134)

Bullet list ends without a blank line; unexpected unindent.

[claytron]

0.1
  • Updated to use the new standard log mechanism: logging.getLogger.

System Message: WARNING/2 (<string>, line 141)

Bullet list ends without a blank line; unexpected unindent.

Reformated messages/docstrings. [dtremea] (2006-03-17)

  • Extended to also patch SecureMailBase from SecureMailHost, if

System Message: WARNING/2 (<string>, line 145)

Bullet list ends without a blank line; unexpected unindent.

available. [dtremea] (2005-10-23)

  • Fixed to work both with old-style and new-style classes, as in

System Message: WARNING/2 (<string>, line 149)

Bullet list ends without a blank line; unexpected unindent.

the later, dict is a 'dictproxy' instance, which doesn't have the setitem method. Bumpped version. Noted changes. And clean up whitespaces, of course... ;-) [dtremea] (2005-10-23)

  • Initial creation/release

System Message: WARNING/2 (<string>, line 155)

Bullet list ends without a blank line; unexpected unindent.

[optilude] (2005-04-05)

Download

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.