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
danathandanathan 

Unable to send outbound email using restricted org wide email address through apex trigger

I have an org wide email address that is accessisble only by System Administrator.

In a trigger I get this org wide email address id and set it in SingleEmailMessage using setOrgWideEmailAddressId method.

Looks like email is sent when users with System Administrator profile executes trigger. But if users with other profiles execute trigger email is not sent.

 

Can you please suggest a solution ?. We don't want to expose org wide email address to all profiles.

Vinita_SFDCVinita_SFDC

Hi,

 

Can you setup the debug logs for any of the user who is not a system administrator and check what do you get in debug logs when email is sent by this user.