i have set a BCC address like this but it does not go out
Contact con1 = new Contact();
con1.FirstName = 'Anil';
con1.LastName = 'Dutt';
con1.Email = '[email protected]';
insert con1;
Messaging.SingleEmailMessage mail1 = new Messaging.SingleEmailMessage();
mail1.setTargetObjectId(con1.Id);
mail1.setWhatId(opp.Id);
mail1.setTemplateId('00Xd0000000PJGH');
String[] bccEmail = new String[]{'[email protected]'};
mail1.setBccAddresses(bccEmail);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail1 });
delete con1;
Mail goes to [email protected] but not to [email protected]
i tried mail1.setBccSender(true) but also not working
No error and BCC compliance is also not enabled
Any idea?
Thanks