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
Chelsea LukowskiChelsea Lukowski 

Email batch job that sends to multiple emails, need to show only recipients address in To field

I have a batch job that takes a Salesforce Report and emails an Excel file to a group of addresses. The users are not Salesforce users. The batch job is working perfectly but when the email goes out it shows ALL the email addresses in the To field. Is there a way to hide the email addresses so that it shows on the receipents address but still sends to everyone in the list?
Ryan GreeneRyan Greene
You'll need to use Blank Carbon Copy (BCC) instead of the Email Adress Method. Method for BCC: 
setBccAddresses(bccAddresses)
Ryan GreeneRyan Greene
One more thing: You're probably using setToAddresses() right now, that will allow up to 100 email addresses, the setBccAddresses() only allows 25.