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

Compliance Bcc Email enabled or not in apex

Is there a way of knowing within apex code whether Compliance Bcc Email has been enabled or not? In order to appropriately allow (or not) users to select a bcc email address when sending an email.
I guess that's a no then.

You should be able to determine the presence of this feature by using the following code:



Organization o = [select id,ComplianceBccEmail from Organization]; if(o.ComplianceBccEmail<>null&&o.ComplianceBccEmail<>'') { // Do not allow BCC, since there is a specific value set. } else { // Allow user-set BCC, since there is no specific value. }