Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Jul 13, 2010
1 parent 8e35978 commit 9512f67
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 51 deletions.
21 changes: 20 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
Overview
========

This package provides zope.sendmail integration for Zope 2.
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, Quoted-Printable or UUEncode
encoding (though automatic body encoding will be applied if a character set is
specified).

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).
2 changes: 0 additions & 2 deletions src/Products/MailHost/MailHost.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#
##############################################################################
"""SMTP mail objects
$Id$
"""
import logging
from os.path import realpath
Expand Down
24 changes: 0 additions & 24 deletions src/Products/MailHost/README.txt

This file was deleted.

17 changes: 6 additions & 11 deletions src/Products/MailHost/SendMailTag.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__rcs_id__='$Id$'
__version__='$Revision: 1.18 $'[11:-2]

from MailHost import MailBase, MailHostError
from DocumentTemplate.DT_Util import parse_params,render_blocks
from DocumentTemplate.DT_String import String


class SendMailTag:
'''the send mail tag, used like thus:
Expand Down Expand Up @@ -102,21 +101,17 @@ def __init__(self, blocks):
else: self.encode=None

def render(self, md):
args=self.args
has_key=args.has_key

if self.mailhost:
mhost=md[self.mailhost]
mhost = md[self.mailhost]
elif self.smtphost:
mhost=MailBase( smtp_host=self.smtphost, smtp_port=self.port )
mhost = MailBase(smtp_host=self.smtphost, smtp_port=self.port)

mhost.send(render_blocks(self.section.blocks, md),
self.mailto, self.mailfrom,
self.subject, self.encode
)
self.subject, self.encode)

return ' '

__call__=render
__call__ = render

String.commands['sendmail']=SendMailTag
String.commands['sendmail'] = SendMailTag
3 changes: 0 additions & 3 deletions src/Products/MailHost/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__doc__='''MailHost Product Initialization
$Id$'''
__version__='$Revision: 1.22 $'[11:-2]

import MailHost
import SendMailTag
Expand Down
2 changes: 0 additions & 2 deletions src/Products/MailHost/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
##############################################################################
"""
Decorator(s)
$Id: MailHost.py 78992 2007-08-19 11:58:08Z andreasjung $
"""

def synchronized(lock):
Expand Down
4 changes: 1 addition & 3 deletions src/Products/MailHost/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""MailHost z3 interfaces.
$Id$
"""MailHost interfaces.
"""

from zope.interface import Interface
Expand Down
2 changes: 0 additions & 2 deletions src/Products/MailHost/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################

# This file is needed to make this a package.
2 changes: 0 additions & 2 deletions src/Products/MailHost/tests/testMailHost.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#
##############################################################################
"""MailHost unit tests.
$Id$
"""

import unittest
Expand Down
1 change: 0 additions & 1 deletion src/Products/MailHost/version.txt

This file was deleted.

0 comments on commit 9512f67

Please sign in to comment.