Registry / communication / zope-sendmail

zope-sendmail

JSON →
library7.1.1pypypi✓ verified 83d ago

Mail sending library for Zope framework, providing queue-based mail delivery and SMTP support. Current version: 7.1.1 (requires Python >=3.10). Release cadence: irregular, with occasional maintenance releases.

pip install zope.sendmail
INSTALL
IMPORT
SIG · ZOPE-SENDMAIL
Z
zope-sendmail
communicationpythonv7.1.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.

Mailer
from zope.sendmail.mailer import SMTPMailer
from zope.sendmail import SMTPMailer
Direct import from top-level package fails; use full path.
QueueMailDelivery
from zope.sendmail.delivery import QueueMailDelivery
from zope.sendmail import QueueMailDelivery
Same as above - specify submodule.

Send an email directly via SMTP without queuing.

from zope.sendmail.mailer import SMTPMailer from zope.sendmail.delivery import DirectMailDelivery mailer = SMTPMailer('smtp.example.com', port=25) delivery = DirectMailDelivery(mailer) from email.message import EmailMessage msg = EmailMessage() msg['From'] = 'sender@example.com' msg['To'] = 'recipient@example.com' msg['Subject'] = 'Test' msg.set_content('Hello') delivery.send('sender@example.com', ['recipient@example.com'], msg) print('Email sent.')
Debug
Known issues
gotchaSMTPMailer does not automatically close the connection; use context manager or call close() explicitly.
fix
Wrap in a context manager: with mailer as m: ... or call mailer.close() after sending.
affects: >=3.0
deprecatedzope.sendmail.mailer.Mailer is deprecated since version 5.0; use SMTPMailer instead.
fix
Replace import: from zope.sendmail.mailer import SMTPMailer
affects: >=5.0
gotchaQueueMailDelivery requires a configured queue directory and a separate script to process the queue (e.g., zope.sendmail.queueprocess).
fix
Ensure you run the queue processor as a separate process, e.g., bin/interp -m zope.sendmail.queueprocess path/to/queue
affects: >=3.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'zope.sendmail'
Package name is zope.sendmail (with dot), but pip install zope-sendmail. Some users try import zope_sendmail.
fix
Run 'pip install zope.sendmail' and import as 'zope.sendmail'.
AttributeError: module 'zope.sendmail' has no attribute 'SMTPMailer'
Attempting to import from top-level instead of submodule.
fix
Use 'from zope.sendmail.mailer import SMTPMailer'.
Upgrade
Version history
7.1.1latest on PyPI · released Jun 3, 2026
Audit
Dependencies
zope.interfacerequiredCore dependency for interface definitions
zope.componentoptionalRequired for utility registration (e.g., IMailDelivery)
Agent activity
57 hits · last 30 days
node
50
OpenAI (training)
1
Resources
zope-sendmail — pip install zope-sendmail · libregistry