concatenating email address
I'm looking to loop through a query and make a list of these: Daniel Kesslerdan...@umd.edu cfset the_from = '#the_from#,#fname# #lname##email#' However, having the and makes it so that the email address doesn't appear at all. Put in colons instead and it displays the email address fine. However, I want it formatted the way that I display above. How can I do that? I tried concatenating it with symbols, but I had the same result. thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334567 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: concatenating email address
Problem's not the concatenation, it's just the browser interprets anything between and as tags, so they're hidden by design. Once you have your list, try this: cfoutput#htmlCodeFormat(the_from)#/cfoutput or this: cfoutput#htmlEditFormat(the_from)#/cfoutput From: daniel kessler dani...@umd.edu Sent: Tuesday, June 15, 2010 9:28 AM To: cf-talk cf-talk@houseoffusion.com Subject: concatenating email address I'm looking to loop through a query and make a list of these: Daniel Kesslerdan...@umd.edu cfset the_from = '#the_from#,#fname# #lname##email#' However, having the and makes it so that the email address doesn't appear at all. Put in colons instead and it displays the email address fine. However, I want it formatted the way that I display above. How can I do that? I tried concatenating it with symbols, but I had the same result. thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334569 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: concatenating email address
Problem's not the concatenation, it's just the browser interprets anything between and as tags, so they're hidden by design. Once you have your list, try this: cfoutput#htmlCodeFormat(the_from)#/cfoutput I tried this and the email message failed anyway. It looked great when I did the output to a web page, but on checking the source, it instead had: PREDaniel Kesslerlt;dani...@umd.edugt;/PRE Clearly, I want the actual characters instead of the PRE and lt; ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334570 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: concatenating email address
So in the CF Code, you don't escape the and 's. So: cfset the_from = the_from , fname lnameemail will get you the string to use in your CFMAIL tag, then when you're displaying it via cfoutput, use: #htmlCodeFormat(the_from)# or, to escape the characters, but don't surround with PREs #htmlEditFormat(the_from)# T On 15 June 2010 15:07, daniel kessler dani...@umd.edu wrote: Problem's not the concatenation, it's just the browser interprets anything between and as tags, so they're hidden by design. Once you have your list, try this: cfoutput#htmlCodeFormat(the_from)#/cfoutput I tried this and the email message failed anyway. It looked great when I did the output to a web page, but on checking the source, it instead had: PREDaniel Kesslerlt;dani...@umd.edu kessler%26lt%3bdani...@umd.edu gt;/PRE Clearly, I want the actual characters instead of the PRE and lt; ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334573 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: concatenating email address
cfset the_from = the_from , fname lnameemail ok, so this worked. I swear that I had tried this before I posted, but I probably didn't try and send the email, just viewed it for debugging. In the view, it's going to do the same wrong thing. So it's sending emails fine now. Thank you very much for your assistance. daniel ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334574 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm