[Zope] Sendmail: Problem with string.join

karthick ramanarayanan karthick@pepco.no
Tue, 20 Mar 2001 14:40:12 +0100 (CET)


Hi,
 Does dbGetRumourInterest method/variable return a list of strings?
It cannot fail if you use string.join with the first argument as a list.

Bye,
A.R.K

> >>>>> "Steve" == Steve Smith <ssmith6@bigpond.net.au> writes:
> 
>     Steve> OK, what's wrong with this then?
> 
>     Steve> <dtml-let email_list=dbGetRumourInterest> <dtml-let
>     Steve> followup_list=dbGetFollowups> <dtml-if email_list>
>     Steve> <dtml-sendmail mailhost="MailHost"> To: <dtml-var
>     Steve> expr="_.string.join(email_list,',')"> From:
>     Steve> ozrail@bigpond.net.au etc...
> 
>     Steve> I found the string.join example in an email from Dieter,
>     Steve> but when I try this I get an error: first argument must be
>     Steve> a sequence of strings.
> 
>     Steve> When I run the SQL standalone, it returns what looks like a
>     Steve> sequence of strings to me. Any clues out there?
> 
> They are probably result objects, not strings. 
> 
> What is the column name? e.g., if it's 'email' try:
> 
> To: <dtml-in email_list><dtml-var email><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>
> 
> There are probably better (but more arcane) ways... 
> 
> -steve
> 
> 
>     Steve> Steve
> 
> 
>     Steve> _______________________________________________ Zope
>     Steve> maillist - Zope@zope.org
>     Steve> http://lists.zope.org/mailman/listinfo/zope ** No cross
>     Steve> posts or HTML encoding!  ** (Related lists -
>     Steve> http://lists.zope.org/mailman/listinfo/zope-announce
>     Steve> http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 
> _______________________________________________
> 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 )
>