[Zope-Checkins] CVS: Zope/lib/python/Products/MailHost - MailHost.py:1.74.4.3

Chris McDonough chrism@zope.com
Fri, 3 Jan 2003 01:33:51 -0500


Update of /cvs-repository/Zope/lib/python/Products/MailHost
In directory cvs.zope.org:/tmp/cvs-serv27194/MailHost

Modified Files:
      Tag: chrism-install-branch
	MailHost.py 
Log Message:
Merging chrism-install-branch with HEAD (hopefully for one of the last
times).



=== Zope/lib/python/Products/MailHost/MailHost.py 1.74.4.2 => 1.74.4.3 ===
--- Zope/lib/python/Products/MailHost/MailHost.py:1.74.4.2	Sun Nov 24 19:14:53 2002
+++ Zope/lib/python/Products/MailHost/MailHost.py	Fri Jan  3 01:32:48 2003
@@ -141,7 +141,7 @@
     security.declarePrivate( '_send' )
     def _send( self, mfrom, mto, messageText ):
         """ Send the message """
-        smtpserver = SMTP( self.smtp_host, self.smtp_port )
+        smtpserver = SMTP( self.smtp_host, int(self.smtp_port) )
         smtpserver.sendmail( mfrom, mto, messageText )
         smtpserver.quit()
 
@@ -184,7 +184,8 @@
     if mto:
         if isinstance(mto, types.StringType):
             mto=map(lambda x:x.strip(), mto.split(','))
-        mo['To'] = ','.join(mto)
+        if not mo.getheader('To'):
+            mo['To'] = ','.join(mto)
     else:
         if not mo.getheader('To'):
             raise MailHostError,"Message missing SMTP Header 'To'"