Chris McDonough already responded to this, but he didn't provide a way to create a list of emails, as opposed to a comma-separated string for use with your string.join(). Guy Davis wrote:
2) Since you can't have <dtml-sendmail mailto="<dtml... get emails from database. (nested <dtml> statements), how does one iteratively declare a list variable and then add to it. Then my mailto="_.string.join(listvar, ', ')" will work.
It seems the majority of my problems are due to thinking in C,C++ or Java where one can simply declare a variable and then work with it. I haven't figured out how to do that in DTML. Any help you can offer is appreciated.
Why can't you get emails from a database? I don't understand. Creating a list is easy in Pythonish DTML: <dtml-call "REQUEST.set('emails', [])"> Appending to the list is easy, too: <dtml-call "emails.append('mew')"> HTH, Ben