Adding cc to a sendmail

Adding cc to a sendmail

Hi I want to add more than 1 cc to an email. I understand I can use

CC   :  "test@me.com","test1@me.com"

but I wish to build up the possibility of having more than one email address from a multiselect of IDs (report_record.EmailCC). If I build up a string...

if ( report_record.EmailCC != null )
{
cc_contacts = "";
for each contact in report_record.EmailCC
{
contact_record = Contacts[ID == contact];
cc_contacts = contact_record.EmailAddress + ",";
}
cc_contacts = cc_contacts.removeLastOccurence(",");
}

    sendmail
    (
        To         :  zoho.loginuserid 
        From     :  zoho.loginuserid
CC        :  cc_contacts
        Subject  :  Test
        Message  :  getUrl(url_string) 
    )

It will send to the first address in the string. Is there a way to make this work??

Thanks