I had a similar requirement recently: send one e-mail to each recipient that contains information about one or more outage incidents. Each recipient was interested in only certain incidents, and didn't want e-mail on the others. (I have a table that indicates which incidents a recipient is interested in.)
I solved the issue by constructing a matrix whose rows were the incidents and columns were the recipients' e-mail address. The trick was to populate the matrix row by row, looping over the incidents. When it came time to do the e-mailing, I processed the matrix column by column, thereby sending only one e-mail to each recipient.
cfmail has a group attribute that works just like the group attibute in cfoutput. it just might be what you are looking for.
Thank you so much Dan. This was the solution. I tried the group in cfquery and cfoutput and it did not work. I did not realize that it was also available in cfmail.
jdeline, could you give more details/code on this?
- Your idea sounds like something I'm working on that will send emails to a users list IF that option has been checked in their profile
- See this thread link at the bottom which shows my User Email Action form: http://forums.adobe.com/message/4884260#4884260
- This is for an In-House Trouble Ticket System where emails only need to go out to other users IF they have been checked to receive those types of tickets.
If you could post your code or sample it might be helpful..