Hi there, I started to use MailHost on a Zope 2.42 installation. What I do is as follows: <dtml-sendmail mailhost="MailHost"> to: robert@redcor.ch subject:Das ist die Testmail from:Halleluja Das ist der Body von dieser Mail </dtml-sendmail> I get a traceback as included. Now my questions: What could be the reason? There were updates to the MailHost. Can I use the ones from the CVS trunk? If not is there a Zope 2.42 (or 2.43) compatible version? Thanks Robert Error Type: TypeError Error Value: len() of unsized object Traceback (innermost last): File /var/lib/zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /var/lib/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /var/lib/zope/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: AA) File /var/lib/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /var/lib/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: mailtest) File /var/lib/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: mailtest) File /var/lib/zope/lib/python/OFS/DTMLMethod.py, line 195, in __call__ (Object: mailtest) File /var/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 546, in __call__ (Object: mailtest) File /var/lib/zope/lib/python/Products/MailHost/SendMailTag.py, line 189, in render (Object: MailHost) File /var/lib/zope/lib/python/Products/MailHost/MailHost.py, line 231, in send (Object: MailHost) File /usr/local/lib/python2.1/smtplib.py, line 481, in sendmail File /usr/local/lib/python2.1/smtplib.py, line 363, in mail File /usr/local/lib/python2.1/smtplib.py, line 122, in quoteaddr File /usr/local/lib/python2.1/rfc822.py, line 475, in parseaddr File /usr/local/lib/python2.1/rfc822.py, line 520, in getaddrlist File /usr/local/lib/python2.1/rfc822.py, line 528, in getaddress File /usr/local/lib/python2.1/rfc822.py, line 508, in gotonext TypeError: (see above)
From: "Robert Rottermann" <robert@redcor.ch>
subject:Das ist die Testmail from:Halleluja
What could be the reason?
Well, you don't have spaces between the subject:-header and the subject, or between the from:-header and the from email. It should be like this: Subject: Das ist die Testmail From: Halleluja And, yes, it is spelled with a capital S and a capital F, and To: is spelled with a capital T.
There were updates to the MailHost. Can I use the ones from the CVS trunk? If not is there a Zope 2.42 (or 2.43) compatible version?
The MailHostFix fixes a couple of problems and is compatible with both 2.3.4 and 2.4.3 as far as I know. http://www.zope.org/Members/regebro/mailhostfix However, I don't think your problem will be solved by that patch.
There is another problem - you have indented the 'To', 'Subject' and 'From' lines. You can't indent them, they must begin at the first character on the line. So - capitalise 'to', 'subject' and 'from' and make sure they aren't indented, and see if that fixes your problems. HarryW On Tuesday 15 January 2002 10:15 am, Lennart Regebro wrote:
From: "Robert Rottermann" <robert@redcor.ch>
subject:Das ist die Testmail from:Halleluja
What could be the reason?
Well, you don't have spaces between the subject:-header and the subject, or between the from:-header and the from email. It should be like this: Subject: Das ist die Testmail From: Halleluja
And, yes, it is spelled with a capital S and a capital F, and To: is spelled with a capital T.
There were updates to the MailHost. Can I use the ones from the CVS trunk? If not is there a Zope 2.42 (or 2.43) compatible version?
The MailHostFix fixes a couple of problems and is compatible with both 2.3.4 and 2.4.3 as far as I know. http://www.zope.org/Members/regebro/mailhostfix However, I don't think your problem will be solved by that patch.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Thank you Lennart and Harry, Harry's tips did the trick. The headers must not be indented! Capitalization and space seem not to matter. This might be MTA dependant. Thanks again Robert ----- Original Message ----- From: "Lennart Regebro" <lennart@regebro.nu> To: "Robert Rottermann" <robert@redcor.ch>; <zope@zope.org> Sent: Tuesday, January 15, 2002 11:15 AM Subject: Re: [Zope] problems with MailHost
From: "Robert Rottermann" <robert@redcor.ch>
subject:Das ist die Testmail from:Halleluja
What could be the reason?
Well, you don't have spaces between the subject:-header and the subject, or between the from:-header and the from email. It should be like this: Subject: Das ist die Testmail From: Halleluja
And, yes, it is spelled with a capital S and a capital F, and To: is spelled with a capital T.
There were updates to the MailHost. Can I use the ones from the CVS trunk? If not is there a Zope 2.42 (or 2.43) compatible version?
The MailHostFix fixes a couple of problems and is compatible with both 2.3.4 and 2.4.3 as far as I know. http://www.zope.org/Members/regebro/mailhostfix However, I don't think your problem will be solved by that patch.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Harry Wilkinson -
Lennart Regebro -
Robert Rottermann