function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suraj DemgundeSuraj Demgunde 

from below code Group_Email is my text field want to send as cc address but mail not delivered to cc its working fine for toaddresss how to solve this

   if(suporg.Group_Email__C!=null){
            String[] emailAddress = suporg.Group_Email__C.split(';');
         
     mail.setToAddresses(emailAddress );
      System.debug(emailAddress );
Bhanu GuptaBhanu Gupta
Hi @Suraj Demgunde, 
You need to add this line of code to set cc adresses : 
mail.setccAddresses(ccAddresses);

e.g. 

 if(suporg.Group_Email__C!=null){
            String[] emailAddress = suporg.Group_Email__C.split(';');
            String[] ccAddresses = new String[] {'sfdcguide@test.com'};
     mail.setToAddresses(emailAddress );
     mail.setccAddresses(ccAddresses);
      System.debug(emailAddress );