Registry / devops / products-mailhost

products-mailhost

JSON →
library6.1pypypi✓ verified 86d ago

Zope integration for zope.sendmail, providing a mail host utility for sending emails from Zope applications. Current version 6.1, released 2024. Part of the Zope ecosystem with periodic releases.

pip install Products.MailHost
INSTALL
IMPORT
SIG · PRODUCTS-MAILHOST
P
products-mailhost
devopspythonv6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MailHost
from Products.MailHost.MailHost import MailHost
from Products.MailHost import MailHost
MailHost class is in the nested module
manage_addMailHost
from Products.MailHost.MailHost import manage_addMailHost
from Products.MailHost import manage_addMailHost
Utility function is also in the nested module

Basic instantiation of MailHost. In Zope, this is typically configured via ZCML or management interface.

from Products.MailHost.MailHost import MailHost from zope.sendmail.delivery import QueuedMailDelivery # Minimal setup (requires Zope configuration) mailhost = MailHost() mailhost.smtp_host = 'localhost' mailhost.smtp_port = 25 mailhost.default_charset = 'utf-8'
Debug
Known issues
breakingVersion 6.0 removed Python 2 support and requires Python >=3.10.
fix
Upgrade Python to >=3.10 and ensure any custom extensions are compatible.
affects: >=6.0
breakingThe old 'MailHost' class from 'Products.MailHost' (direct import) no longer works; import from 'Products.MailHost.MailHost'.
fix
Change import statement to 'from Products.MailHost.MailHost import MailHost'.
affects: >=4.0
gotchaMailHost does not automatically set up SMTP connection; requires explicit configuration of smtp_host, smtp_port, etc.
fix
Set attributes like mailhost.smtp_host = 'your-smtp-server' before sending mail.
affects: all
deprecatedThe 'MailHost' class now delegates to 'zope.sendmail'; direct manipulation of the mail queue may change.
fix
Use zope.sendmail APIs for advanced queuing.
affects: >=6.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'Products.MailHost'
Package not installed.
fix
Run 'pip install Products.MailHost'
AttributeError: module 'Products.MailHost' has no attribute 'MailHost'
Incorrect import pattern (importing from top-level instead of nested module).
fix
Use 'from Products.MailHost.MailHost import MailHost'
TypeError: Can't instantiate abstract class MailHost with abstract methods send
Missing required configuration attributes (smtp_host, smtp_port).
fix
Set smtp_host and smtp_port before using the MailHost instance.
smtplib.SMTPException: SMTP AUTH extension not supported by server
SMTP server requires authentication but MailHost is not configured for it.
fix
Set mailhost.smtp_user_id and mailhost.smtp_pwd attributes.
Upgrade
Version history
6.1latest on PyPI · released Nov 20, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
products-mailhost — pip install products-mailhost · libregistry