As was said, using a cfloop inside of the email will do what you want.

As an aside, it was suggested to use the query attribute of cfmail, I
would argue that you should never, ever use this unless you are on CF
version 5 or earlier.

When CF went to v6.0, the behavior of the cfmail tag was changed.
Formerly if cfmail was sending to a group of recipients (where the
group's email addresses came from the query specified in the query
attribute) and it encountered a bad address, it would just try and
send anyway and the message would die in CF's mail spool when the mail
server refused it.

Starting with v6.0, if an email address was malformed then cfmail
would throw an error.

There is no reasonable, practical way I am aware of to restart - after
the point of failure - a cfmail call right in the middle of itself,
such as when a bad email address is found in the middle of a query
result set.  As a result of that, you run your query as normal.  Then
run a cfloop over the result set.  Inside the loop you have a
try/catch block where inside the try is your cfmail call, which is
only trying to send to queryName.emailAddress[currentRow].  Your catch
block safely handles failure recovery if you find a bad address inside
of the loop and allows the loop to continue.

A lot of folks were ticked when this change happened, but it
underscored the value of input controls and also helped teach the
value of robust error handling.

-- 
[EMAIL PROTECTED]
Janitor, MSB Web Systems
mysecretbase.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259359
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to