[Checkins] SVN: Products.TransactionalMailHost/trunk/mailhost.py
works again with standard zope.sendmail package
Andreas Jung
andreas at andreas-jung.com
Sat Aug 18 13:08:30 EDT 2007
Log message for revision 78960:
works again with standard zope.sendmail package
Changed:
U Products.TransactionalMailHost/trunk/mailhost.py
-=-
Modified: Products.TransactionalMailHost/trunk/mailhost.py
===================================================================
--- Products.TransactionalMailHost/trunk/mailhost.py 2007-08-18 17:03:47 UTC (rev 78959)
+++ Products.TransactionalMailHost/trunk/mailhost.py 2007-08-18 17:08:30 UTC (rev 78960)
@@ -62,13 +62,22 @@
""" Create a new SMTPMailer instance """
if not hasattr(self, '_v_mailhost'):
- self._v_mailer = SMTPMailer(self.smtp_host,
- self.smtp_port,
- self.smtp_username or None,
- self.smtp_password or None,
- self.no_tls,
- self.force_tls,
- )
+ try:
+ # new extended zope.sendmail package
+ self._v_mailer = SMTPMailer(self.smtp_host,
+ self.smtp_port,
+ self.smtp_username or None,
+ self.smtp_password or None,
+ self.no_tls,
+ self.force_tls,
+ )
+ except TypeError:
+ # standard zope.sendmail package
+ self._v_mailer = SMTPMailer(self.smtp_host,
+ self.smtp_port,
+ self.smtp_username or None,
+ self.smtp_password or None,
+ )
return self._v_mailer
More information about the Checkins
mailing list