[Zope] Sendmail: Problem with string.join

Steve Spicklemire steve@spvi.com
Tue, 20 Mar 2001 08:19:23 -0500 (EST)


>>>>> "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 )