Email not go to BCC address

Tag: salesforce , apex-code Author: chien0813 Date: 2012-04-16

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();
 String[] bccEmail = new String[]{'[email protected]'};
 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?


Just changed your email addresses so you don't get spam!
mail1.setBccSender(true) actually works, the problem was some other

Other Answer1

From the table of SingleEmailMessage Methods:


A list of blind carbon copy (BCC) addresses. The maximum allowed is 25. This argument is allowed only when a template is not used.

Emphasis mine. Hope this helps.