Commit c876b050 authored by Jens Vagelpohl's avatar Jens Vagelpohl

Small corrections

parent 44f0e9ad
......@@ -12,8 +12,8 @@
##############################################################################
"""SMTP mail objects
$Id: MailHost.py,v 1.68 2002/01/15 04:45:13 jens Exp $"""
__version__ = "$Revision: 1.68 $"[11:-2]
$Id: MailHost.py,v 1.69 2002/01/15 14:58:37 jens Exp $"""
__version__ = "$Revision: 1.69 $"[11:-2]
from Globals import Persistent, DTMLFile, InitializeClass
from smtplib import SMTP
......@@ -162,7 +162,6 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
"""Looks like the same function as send() - scheduledSend() is nowhere
used in Zope. No idea if it is still needed/used (ajung)
"""
headers = extractheaders(messageText)
if not headers['subject']:
......@@ -198,7 +197,7 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
security.declarePrivate( '_send' )
def _send( self, headers, body ):
""" Send the message """
smtpserver = SMTP( self.smtp_host, self.smtp_port )
smtpserver = SMTP( self.smtp_host, int( self.smtp_port ) )
smtpserver.sendmail( headers['from'], headers['to'], body )
smtpserver.quit()
......
......@@ -10,8 +10,8 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
__rcs_id__='$Id: SendMailTag.py,v 1.14 2002/01/15 04:23:08 jens Exp $'
__version__='$Revision: 1.14 $'[11:-2]
__rcs_id__='$Id: SendMailTag.py,v 1.15 2002/01/15 14:58:37 jens Exp $'
__version__='$Revision: 1.15 $'[11:-2]
from MailHost import MailBase
from DocumentTemplate.DT_Util import parse_params,render_blocks
......@@ -109,7 +109,7 @@ class SendMailTag:
if self.mailhost:
mhost=md[self.mailhost]
elif self.smtphost:
mhost=MailBase( self.smtphost, self.port )
mhost=MailBase( smtp_host=self.smtphost, smtp_port=self.port )
mhost.send(render_blocks(self.section.blocks, md),
self.mailto, self.mailfrom,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment