Did I do something really wrong here?
I am using cfmail to query a database to send a welcome mail for users in the
database. Instead of looping through the database, it takes the first filed and
sends that for the number of users in there. There are 3 so if I run the code I
get 3 mails in one account,and not the one in the 3 mail accounts.
<!---send emails--->
<cfquery datasource="my_DSN" name="GetUsers">
select emailaddress, firstname
from emails
</cfquery>
<cfloop query="GetUsers">
<cfmail to="#emailaddress#"
from="[email protected]"
subject="Hello From Got Nutrients?"
type="HTML"
query="GetUsers">
Dear #GetUsers.firstname#<br />
We, here at Got Nutrients?, would like to thank you for joining.<br />
Best wishes
John
</cfmail>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4303
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15