The emails get sent but the to address should list in the email
If I do something like this
<cfmail type="html" query="q" to="#q.email#
The emails get sent but the to address should list in the email, but they don't get listed.
If I do something like this
<cfmail type="html" query="q" to="#q.email#
The emails get sent but the to address should list in the email, but they don't get listed.
The emails all go out but I thought I would have seen all the email recipients in the email header, thats all.
recip1@my.com,recip2@my.com,recip3@my.com,recip4@my.com
Looks like I'll have to create this string manualy
You should indeed create the string manually. There is really nothing wrong with your code. It is a peculiarity of Coldfusion that q.email behaves at once like a simple value and like a complex value.
Suppose there are 10 email addresses in the result set. Then <cfoutput>#q.email#</cfoutput> will display just the first one. However, <cfoutput query="q">#q.email[currentrow]# </cfoutput> will display all ten.
One way to create the string manually:
<cfsavecontent variable="emails_from_db"><cfoutput query="q">#q.email[currentrow]#,</cfoutput></cfsavecontent>
I have ignored the trailing comma at the end because I see you intend to stick an extra email at the end anyway.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.