Skip to main content Stream TDX Bengaluru on Salesforce+. Start learning the critical skills you need to build and deploy trusted autonomous agents with Agentforce. Register for free.
Hi,

I have verified an email in organization wide email address and sending email from apex class. This is working fine. But for one user it is throwing following exception,

System.EmailException: SendEmail failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, Not profiled to access this Org-wide Email Address: []

 
7 answers
  1. Aug 18, 2015, 6:30 AM

    Make sure that you have enabled user profile in the org-wide email address to use it as From email address.

    • Go to > Setup > Email Administration > Org-wide default
    • Click edit to the Org-wide email address, if you selected "Allow Only Selected Profiles to Use the From Address" then make sure that the user profile is included in the list
  2. Jul 22, 2016, 3:24 PM
    I just ran into this today, and adding the users profile to the allowed profile fixed it.  What I don't understand is, if it's trying to send the email from Apex, why does the user need permission?  I thought apex code was run as system profile? 
  3. May 26, 2017, 2:08 PM
    @Jim, yes I agree, it should allow anyone to use it via apex.  Yet another unnecessary hoop we have to jump through.
  4. Aug 18, 2015, 9:08 AM
    Navigate to Setup > Email Administration > Deliverability to update the Access Level to All Email.
  5. Aug 18, 2015, 6:29 AM
    On user profile, check "Send Email" checkbox.

    Let me know if this helps.
0/9000