[Zope] Mailhost TypeError

Roch'e Compaan roche@ybm.co.za
Mon, 2 Oct 2000 18:35:15 +0200


I'm recreated a mailhost in Zope 2.2.0.  Whenever I want to send mail with
sendmail tag I get a TypeError.  This worked in Zope 2.1.x.  This is the
traceback:

Traceback (innermost last):
  File /usr/local/zope/2-2-0/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /usr/local/zope/2-2-0/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /usr/local/zope/2-2-0/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
    (Object: RoleManager)
  File /usr/local/zope/2-2-0/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /usr/local/zope/2-2-0/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: manage_editProperties)
  File /usr/local/zope/2-2-0/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: manage_editProperties)
  File /usr/local/zope/2-2-0/lib/python/Products/Etailer/OrderManager.py,
line 136, in manage_editProperties
    (Object: RoleManager)
  File /usr/local/zope/2-2-0/lib/python/App/special_dtml.py, line 120, in
__call__
    (Object: testemail)
  File /usr/local/zope/2-2-0/lib/python/DocumentTemplate/DT_String.py, line
528, in __call__
    (Object: testemail)
  File /usr/local/zope/2-2-0/lib/python/Products/MailHost/SendMailTag.py,
line 188, in render
    (Object: MailHost)
  File /usr/local/zope/2-2-0/lib/python/Products/MailHost/MailHost.py, line
220, in send
    (Object: MailHost)
  File /var/tmp/python/python-root/usr/lib/python1.5/smtplib.py, line 465,
in sendmail
  File /var/tmp/python/python-root/usr/lib/python1.5/smtplib.py, line 349,
in mail
  File /var/tmp/python/python-root/usr/lib/python1.5/smtplib.py, line 118,
in quoteaddr
  File /var/tmp/python/python-root/usr/lib/python1.5/rfc822.py, line 451, in
parseaddr
  File /var/tmp/python/python-root/usr/lib/python1.5/rfc822.py, line 496, in
getaddrlist
  File /var/tmp/python/python-root/usr/lib/python1.5/rfc822.py, line 504, in
getaddress
  File /var/tmp/python/python-root/usr/lib/python1.5/rfc822.py, line 484, in
gotonext
TypeError: len() of unsized object

-->

The source for my DTML method:

<dtml-if orderemail>
<dtml-sendmail mailhost="MailHost">
To: <<dtml-var orderemail>>
From: <<dtml-var orderemail>>
Subject: Test email from <dtml-var shopName>

Hi,

This is a test email from your online shop.

If you have received this email, then you will also receive an email for
each of the orders that are placed at your online store.

</dtml-sendmail>
</dtml-if>