Skip to main content
https://github.com/zopefoundation/Products.MailHost/actions/workflows/tests.yml/badge.svg https://coveralls.io/repos/github/zopefoundation/Products.MailHost/badge.svg?branch=master Latest stable release on PyPI Stable release supported Python versions

Products.MailHost

The MailHost product provides support for sending email from within the Zope environment using MailHost objects.

An optional character set can be specified to automatically encode unicode input, and perform appropriate RFC 2822 header and body encoding for the specified character set. Full python email.Message.Message objects may be sent.

Email can optionally be encoded using Base64 or Quoted-Printable encoding (though automatic body encoding will be applied if a character set is specified).

Usage

MailHost provides integration with the Zope transaction system and optional support for asynchronous mail delivery. Asynchronous mail delivery is implemented using a queue and a dedicated thread processing the queue. The thread is (re)-started automatically when sending an email. The thread can be started manually (in case of restart) by calling its manage_restartQueueThread?action=start method through HTTP. There is currently no possibility to start the thread at Zope startup time.

Supports TLS/SSL encryption (requires Python compiled with SSL support).

Configuration

To force MailHost to only queue mails without sending them, activate queuing in the ZMI and set the environment variable MAILHOST_QUEUE_ONLY=1. This could be helpful in a staging environment where mails should not be sent.

Changelog

6.1 (2025-11-20)

  • Switch to PEP 420 native namespace.

  • Add support for Python 3.14.

  • Drop support for Python 3.9.

6.0 (2025-01-31)

  • Drop support for Python 3.7, 3.8.

  • Add support for Python 3.13.

  • Add support to implicit_tls flag. With this flag set, MailHost use TLS from the beginning of the connection, known as SMTPS and commonly used on TCP port 465. Requires zope.sendmail >= 6.2

5.2 (2024-02-08)

  • Use SMTP compatible line separators in generated messages.

  • Remove doc string from the MailHost sendTemplate method to prevent publishing.

5.1 (2024-02-07)

  • Remove doc string from the MailHost send method to prevent publishing.

  • Add support for Python 3.12.

5.0 (2023-02-01)

  • Drop support for Python 2.7, 3.5, 3.6.

4.13 (2022-12-16)

  • Fix insidious buildout configuration bug for tests against Zope 4.

  • Add support for Python 3.11.

4.12 (2022-03-30)

  • Add support for Python 3.9 and 3.10.

4.11 (2021-01-21)

  • Use standard conforming \r\n line endings. This may require adaptations in testsSupport messages with line separation \r\n (#35).

4.10 (2020-07-31)

  • We depend on zope.sendmail >= 5.1.

  • Support messages with explicit Content-Transfer-Encoding: 8bit (#30).

4.9 (2020-02-12)

  • Fix DeprecationWarnings from DocumentTemplate with import changes

4.8 (2020-01-06)

  • Show a hint in the ZMI if the delivery queue is forced to queue-only mode (#25)

  • Improve the asynchronous delivery information on the ZMI Edit tab (#24)

  • Fix queued mail delivery with just a single string receiver email (#26)

  • Fix Flake8 issues. (#22)

4.7 (2019-06-03)

  • Do not start QueueProcessorThread on configuration update. (#14)

4.6 (2019-05-16)

  • Fix breaking sendmail tag rendering with DocumentTemplate > 3

4.5 (2019-04-07)

  • Prevent ZMI blowups when pointing to a non-Maildir queue folder (#2)

  • Changed ZMI forms for Zope 4 ZMI compliance (#17)

  • Packaging and test configuration cleanup

  • Add badges to the README

4.4 (2019-04-03)

  • Add ability to disable sending of queued mails. Details see README.rst. (#14)

4.3 (2019-03-08)

  • silence deprecation warning due to non-raw regex (#13)

  • Specify supported Python versions using python_requires in setup.py (Zope#481)

  • Add support for Python 3.8

4.2 (2018-10-05)

  • Add icon for Bootstrap ZMI.

  • Fix start-up in case Products.GenericSetup is not installed. (#9)

  • Add support for Python 3.7.

4.1 (2018-05-20)

  • Fix GenericSetup support for GenericSetup 2.x

  • Fix DeprecationWarnings

  • PEP-8 code style compliance

  • Drop support for Python 3.4

4.0 (2017-09-14)

  • Move GenericSetup export/import support from the GenericSetup package to MailHost as a setuptools extra.

  • Python 3 compatibility

  • Require Zope 4, aka drop Zope 2.13 support.

  • add test coverage reporting

  • Use @implementer class decorator.

  • Drop long-deprecated support for uuencoded emails.

3.0 (2016-07-18)

  • Remove HelpSys support.

2.13.2 (2014-11-02)

  • Adjust tests to pass with latest zope.sendmail versions.

  • Specify detailed distribution dependencies.

2.13.1 (2010-09-25)

  • LP #642728: Fixed TypeError on nested multi part messages in MailHost.

2.13.0 (2010-07-13)

  • Released as separate package.

Release files for Products.MailHost 6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Products.MailHost 6.1
File Size Uploaded
products_mailhost-6.1.tar.gz 27.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Products.MailHost 6.1
File Interpreter ABI Platform
products_mailhost-6.1-py3-none-any.whl Python 3 none any Details

Total release size: 57.0 kB

Release files / products_mailhost-6.1.tar.gz

Download URL products_mailhost-6.1.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fc5a6f20777e2e6ada0e9d7529d0e36b43cfe7cb8fef2678141449622740d6da
BLAKE2b-256 checksum
How to use checksums
9a0ad6bd3306b97f680544cba6b63acbc2292e5fae480b32fe5b2aef9a6ffd5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / products_mailhost-6.1-py3-none-any.whl

Download URL products_mailhost-6.1-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d353c016967dc4c015343e583607e76770a6449bca66e0e22e59db29525a5829
BLAKE2b-256 checksum
How to use checksums
aab0b659762ad18db105e5313f98eedc0ae329e19d511f0ec5ccdcdc85688086
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

6.1 This release

2 release files

6.0

2 release files

5.2

2 release files

5.1

2 release files

5.0

2 release files

4.13

2 release files

4.12

2 release files

4.11

2 release files

4.10

2 release files

4.9

2 release files

4.8

2 release files

4.7

2 release files

4.6

2 release files

4.5

2 release files

4.4

2 release files

4.3

2 release files

4.2

2 release files

4.1

2 release files

4.0

2 release files

3.0

2 release files

2.13.3

1 release file

2.13.2

1 release file

2.13.1

1 release file

2.13.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page