You need to sign in to do that
Don't have an account?
Email not go to BCC address
Hi,
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 = 'anil@swiftsetup.com';
insert con1;
Messaging.SingleEmailMessage mail1 = new Messaging.SingleEmailMessage();
mail1.setTargetObjectId(con1.Id);
mail1.setWhatId(opp.Id);
mail1.setTemplateId('00Xd0000000PJGH');
String[] bccEmail = new String[]{'anildbest83@gmail.com'};
mail1.setBccAddresses(bccEmail);
mail1.setOrgWideEmailAddressId('0D2d00000004D3Z');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail1 });
delete con1;
Mail goes to anil@swiftsetup.com but not to anildbest83@gmail.com
Any idea?
try to use this and check
mail1.setBccSender(true);
All Answers
r u getting any error while doing this? and check If the BCC compliance option is set at the organization level, the user cannot add BCC addresses on standard messages
No error and BCC compliance is also not enabled
try to use this and check
mail1.setBccSender(true);