I began with the need to provide a comma delimited list of email addresses to the "bcc" attribute of a <cfmail> tag such that a single invocation of the <cfmail> would occur.
The solution outlined by @gdemaria worked for this issue but a new related issue has arisen. the solution provided resulted in some 13,000 addresses in the "bcc" attribute. This was to much for the size of the virtaul machine on which Smatermail resides.
I now need to process the mailing list in chunks of maybe a thousand records at a time. I'm thinking that I need to loop thru the 13,000 record query to pick up each 1,000 addresses at a time. I would process the first 1,000 records and then return after some period of time to process the next 1,000 records (maybe a half-hour later.
DOes any one have a suggestion on writing the code to loop thru the initial query to get the 1, 000 record chunk?