[Zope] sendmail and dtml-in

Phil Harris phil.harris@zope.co.uk
Thu, 13 Dec 2001 16:07:24 -0000


because you have a spurios comma (,) whnever there is only one recipient,
try this:


to: <dtml-in adresse>
        <dtml-unless sequence-first>,</dtml-unless><dtml-var sequence-item>
</dtml-in>

----- Original Message -----
From: "Stephan Goeldi" <stephan_goeldi@hotmail.com>
To: <zope@zope.org>
Sent: Thursday, December 13, 2001 3:59 PM
Subject: [Zope] sendmail and dtml-in


> In a sendmail method, I use this strings to generate the TO:-adresses from
a
> selectable list:
>
> to: <dtml-in adresse>
>         <dtml-var sequence-item>,
> </dtml-in>
>
> When I select 2 recipients, it works. When I select only 1 recipient, I
get
> this traceback:
>
> <!--
> Traceback (innermost last):
>   File /www/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 223, in publish_module
>   File /www/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 187, in publish
>   File /www/Zope-2.4.3-linux2-x86/lib/python/Zope/__init__.py, line 226,
in
> zpublisher_exception_hook
>     (Object: mail)
>   File /www/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 171, in publish
>   File /www/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/mapply.py, line
160,
> in mapply
>     (Object: sendmail)
>   File /www/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/Publish.py, line
> 112, in call_object
>     (Object: sendmail)
>   File /www/Zope-2.4.3-linux2-x86/lib/python/OFS/DTMLMethod.py, line 199,
in
> __call__
>     (Object: sendmail)
>   File
/www/Zope-2.4.3-linux2-x86/lib/python/DocumentTemplate/DT_String.py,
> line 546, in __call__
>     (Object: sendmail)
>   File
> /www/Zope-2.4.3-linux2-x86/lib/python/Products/MailHost/SendMailTag.py,
line
> 187, in render
>     (Object: smtp.balcab.ch)
>   File /www/Zope-2.4.3-linux2-x86/lib/python/DocumentTemplate/DT_In.py,
line
> 702, in renderwob
>     (Object: adresse)
> InError: (see above)
>
> -->
>
>
>
> --------------------------------------
> Goeldi.com - Internet Services
> --------------------------------------
> www.goeldi.com
> web@goeldi.com
> Tel   +41-61-7330555
> Fax  +41-61-7330556
> --------------------------------------
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.
>
>
> _______________________________________________
> 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 )