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
suji srinivasansuji srinivasan 

how to keep cc in visualforce email template?

Hi , i need to keep cc as respective users personal email id in visualforce email template . how to keep cc dynamically in visualforce email template ?

Thanks in advance
 
Best Answer chosen by suji srinivasan
PriyaPriya (Salesforce Developers) 
Hey Suji,

The email template itself would not include the AdditionalTo or CC recipients.  But you should be able to use a custom controller to define these.
 
In the Visualforce Developer's Guide (Spring '11), see page 142 in the 'Integrating Email with Visualforce section.  This shows an example of using a custom controller with a Visualforce email template.
 
In the Apex Code Developer's Guide (Spring '11), see page 330 for the Email object methods you would use to set the additional recipient fields.
 
Also Similar example has been discussed here :- https://developer.salesforce.com/forums/?id=9060G000000Bg63QAC
 

Kindly mark it as the best answer if it works for you.

 

Thanks & Regards,

Priya Ranjan