[Zope] DTML Sendmail Error

Zope@Stylus zope@stylusinc.net
Mon, 5 May 2003 16:49:14 +0530


Hi Lennart

Thaks for your prompt reply.I have asigned the security permission of the
Mail Host to Anonymous to allow all users who are not loggged into Zope to
send their mails.
Now let me clarify how I am trying to use dtml-sendmail
<dtml-sendmail mailhost="MailHost">
        To: <dtml-var recipient>
        From: <dtml-var sender>
        Subject: <dtml-var subject>

        Dear <dtml-var recipient>,

        You order number <dtml-var order_number> is ready.
        Please pick it up at your soonest convenience.
</dtml-sendmail>

I am calling this DTML Document from another DTML Document passing the
parameters recepient,sender,subject,order_number from a FORM.
I am using Python version 2.1.3
Could you please help me in figuring what I am doing wrong.Also could you
please tell me how I can add delete users from acl_users without actually
logging into ZOPE through the ZMI Login.And how to Login a User who is
m,ember of acl_users into the Zope server without actually going through the
ZMI Login.THis would solve my problem fr adding Folders into the Zope Folder
Structure and also to access SquishDOT.

Thanks and Best regards
John
----- Original Message -----
From: "Lennart Regebro" <lennart@regebro.nu>
To: "Zope@Stylus" <zope@stylusinc.net>; <zope@zope.org>
Sent: Monday, May 05, 2003 3:08 PM
Subject: Re: [Zope] DTML Sendmail Error


: Zope@Stylus wrote:
: > What len() is being asked for??
:
: Well, use the source, Luke. ;) You are the one with the source on your
: disk, I for example, would have to download Zope 2.5.1 and check that I
: have the same Python version as you (you don't mention it) to be sure
: I'm actually looking at the same code.
:
: But almost as good would be if you could provide an example of what you
: do to get this error. That would probably explain what you do wrong.
:
: Since the error occurs in rf822.py, it probably is either the headers,
: one specific header or the body that is empty. The 2.5.1 MailHost send
: didn't have a very stable handling of header-handling, so it was easy to
: **** up.
:
:

----------------------------------------------------------------------------
---------------------------------------------

HI all
I am working on mandrake Linux 8.2,Zope-2.5.1
I am trying to use a dtml-sendmail tag to send a mail .But everytime I try I
keep geting the same error.Please help me out.
Where am I going worng?What len() is being asked for??

 Zope has encountered an error while publishing this resource.

Error Type: TypeError
Error Value: len() of unsized object

Traceback (innermost last):
  File /Users/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 150, in
publish_module
  File /Users/zope/Zope-2.5.1/Products/Localizer/__init__.py, line 65, in
new_publish
  File /Users/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 114, in
publish
  File /Users/zope/Zope-2.5.1/lib/python/Zope/__init__.py, line 159, in
zpublisher_exception_hook
    (Object: Test)
  File /Users/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 98, in
publish
  File /Users/zope/Zope-2.5.1/lib/python/ZPublisher/mapply.py, line 88, in
mapply
    (Object: send_a_mail)
  File /Users/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 39, in
call_object
    (Object: send_a_mail)
  File /Users/zope/Zope-2.5.1/lib/python/OFS/DTMLDocument.py, line 127, in
__call__
    (Object: send_a_mail)
  File /Users/zope/Zope-2.5.1/lib/python/DocumentTemplate/DT_String.py, line
473, in __call__
    (Object: send_a_mail)
  File /Users/zope/Zope-2.5.1/lib/python/Products/MailHost/SendMailTag.py,
line 116, in render
    (Object: MailHost)
  File /Users/zope/Zope-2.5.1/lib/python/Products/MailHost/MailHost.py, line
156, in send
    (Object: MailHost)
  File /Users/zope/Zope-2.5.1/lib/python/Products/MailHost/MailHost.py, line
201, in _send
    (Object: MailHost)
  File /Users/zope/Zope-2.5.1/lib/python2.1/smtplib.py, line 479, in
sendmail
  File /Users/zope/Zope-2.5.1/lib/python2.1/smtplib.py, line 361, in mail
  File /Users/zope/Zope-2.5.1/lib/python2.1/smtplib.py, line 122, in
quoteaddr
  File /Users/zope/Zope-2.5.1/lib/python2.1/rfc822.py, line 475, in
parseaddr
  File /Users/zope/Zope-2.5.1/lib/python2.1/rfc822.py, line 520, in
getaddrlist
  File /Users/zope/Zope-2.5.1/lib/python2.1/rfc822.py, line 528, in
getaddress
  File /Users/zope/Zope-2.5.1/lib/python2.1/rfc822.py, line 508, in gotonext
TypeError: (see above)



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003