[Zope] MailHost problems

Jeff Peterson jpeterso@rangebroadband.com
Wed, 12 Sep 2001 13:16:14 -0500


We are having a mailhost problem.

System info:

Zope Version  Zope 2.3.3 (source release, python 1.5.2, linux2)
Python Version  1.5.2 (#1, Dec 21 2000, 15:29:08) [GCC egcs-2.91.66
19990314/Linux (egcs-
System Platform  linux-i386



We are using ZPT, and trying to call a dtml-method (if there is a ZPT method
to use mailhost we'd be glad to know)



This is the method code:

<dtml-sendmail mailhost="MailHost">
To: Cable-Test <cable-test@rangebroadband.com>
Cc: Automated Request <<dtml-var getEmailByName>>
<dtml-if mailSupport>Bcc: Support <support@rangebroadband.com></dtml-if>
From: Automated Request <<dtml-var getEmailByName>>
Subject: New Cable Modem [<dtml-if form_name><dtml-var form_name></dtml-if>
(MAC: <dtml-if form_mac_address><dtml-var form_mac_address></dtml-if>)]

Bridge Employee: <dtml-var "AUTHENTICATED_USER.getUserName()">
Name: <dtml-var form_name>
Address: <dtml-var form_address>
Phone: <dtml-var form_phone>
MAC: <dtml-var form_mac_address>
Node: <dtml-var form_node>
QoS: <dtml-var form_QoS>
<dtml-in "_.range(1, num+1)"><dtml-if
"_['form_ip'+_.str(_['sequence-item'])]">
IP: <dtml-var "_['form_ip'+_.str(_['sequence-item'])]">
</dtml-if></dtml-in>
Date: <dtml-var month>/<dtml-var day>/<dtml-var year>
Time: <dtml-var hour><dtml-var min><dtml-var ampm>
<dtml-if form_Comment>
Comments:
<dtml-var form_Comment>
</dtml-if>
</dtml-sendmail>



This produces this traceback:

   Site Error
An error was encountered while publishing this resource.

TypeError

Sorry, a site error occurred.

Traceback (innermost last):
  File /home/zope/8000/lib/python/ZPublisher/Publish.py, line 223, in
publish_module
  File /home/zope/8000/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /home/zope/8000/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
    (Object: Traversable)
  File /home/zope/8000/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /home/zope/8000/lib/python/ZPublisher/mapply.py, line 160, in mapply
    (Object: sendNewModemInfo)
  File /home/zope/8000/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: sendNewModemInfo)
  File /home/zope/8000/lib/python/OFS/DTMLMethod.py, line 189, in __call__
    (Object: sendNewModemInfo)
  File /home/zope/8000/lib/python/DocumentTemplate/DT_String.py, line 540,
in __call__
    (Object: sendNewModemInfo)
  File /home/zope/8000/lib/python/Products/MailHost/SendMailTag.py, line
189, in render
    (Object: MailHost)
  File /home/zope/8000/lib/python/Products/MailHost/MailHost.py, line 222,
in send
    (Object: MailHost)
  File /usr/lib/python1.5/site-packages/smtplib.py, line 465, in sendmail
  File /usr/lib/python1.5/site-packages/smtplib.py, line 349, in mail
  File /usr/lib/python1.5/site-packages/smtplib.py, line 118, in quoteaddr
  File /usr/lib/python1.5/site-packages/rfc822.py, line 451, in parseaddr
  File /usr/lib/python1.5/site-packages/rfc822.py, line 496, in getaddrlist
  File /usr/lib/python1.5/site-packages/rfc822.py, line 504, in getaddress
  File /usr/lib/python1.5/site-packages/rfc822.py, line 484, in gotonext
TypeError: len() of unsized object



if I remove the Cc: and Bcc: headers the mail is sent but the email that
comes is mangled:

There is no To: or From: and the body of the email looks like this:

To: Cable-Test <cable-test@rangebroadband.com>
From: Automated Request <jpeterso@rangebroadband.com
>
Subject: New Cable Modem [7th Ave Apts #2 (MAC: 000000000000)]

Bridge Employee: jeff
Name: 7th Ave Apts #2
Address: 1114 E. 22nd St.
Phone: 262-0001
MAC: 000000000000
Node: 1
QoS: 256k
IP: 24.230.24.1
Date: 1/1/2001
Time: 8:00am
Comments:
Test

I checked the archives and found a post related to a debugging tool called
ZDebug, this is not installed.  I was unable to find out anything else from
the archives.

Any help would be appreciated.

TIA,

--
Jeffrey D. Peterson
Webmaster/Web & Web Applications Engineer
Range TV Cable & Broadband
1818 E. 3rd Ave.  Hibbing, MN 55746
jpeterso@rangebroadband.com