Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl,v diff -u -r1.18.2.7 -r1.18.2.8 --- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl 28 Dec 2021 10:34:45 -0000 1.18.2.7 +++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl 28 Dec 2021 16:53:05 -0000 1.18.2.8 @@ -226,8 +226,8 @@ # and message and replace them with the value of that # column as returned by the query set pairs [list] - for {set i 0} {$i < [ns_set size $recipient]} {incr i} { - lappend pairs "\{[ns_set key $recipient $i]\}" "[ns_set value $recipient $i]" + foreach {key value} [ns_set array $recipient] { + lappend pairs "\{$key\}" $value } # it's possible that someone may want to override the from