What is the correct syntax for the cc attribute within <cfmail>  to send multiple cc:'s

Posted on 2011-04-19
Medium Priority
Last Modified: 2012-05-11
I am new to Cold Fusion. I need to hard code  2 email addresses to the cc attribute that is already within <cfmail . The 2 Cc email addresses will be hard coded abc@xyz.com and def@xyz.com respectively and will append the cc attribute in <cfmail from="#from#" to="#to#" cc="#cc#" subject="#subject#" type="HTML">#message# </cfmail>   such that these 2 people will always get a Cc of the Email along with the single person set by #CC#  in  <cfmail

thank you,
Question by:tcmmaxt
1 Comment
LVL 52

Accepted Solution

_agx_ earned 2000 total points
ID: 35427277

CFMAIL takes a comma delimited list of email addresses. To be safe I'd append the values to the #cc# variable with list functions. Then call cfmail

     <cfset cc = listAppend(cc, "abc@xyz.com,def@xyz.com")>
    <cfmail from="#from#" to="#to#" cc="#cc#" subject="#subject#" type="HTML">#message# </cfmail>  

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question