You need to sign in to do that
Don't have an account?

first error: INSUFFICIENT_ACCESS_OR_READONLY, Not profiled to access this Org-wide Email
HI Here is my scenario that causes this error:
I have create a VF page which is a registration form. It is hosted on a Force.com site. What I want to do is this:
When a user enteres contact information, he will get an email notification containing a generic email address called "noreply@someemail.org" listed as the From: Email Header or Sender. I use Org wide Email Addressesmethod setOrgWideEmailAddressId to create this.
However that email doesn't appear and I get an error rmessage that says :
SendEmail failed caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, Not profiled to access this Org-wide Email.
Q) Does anyone know if I am receiving this error because the external user to the Force.com Site is of a profile type that is a Guest Site User and not one that is a Salesforce Licensed User like System Admin?
I ask this question because when I run a test locally for this VF Page within Salesforce (as a System Admin), the test user I use will get the email notification that does contain the Sender Header "noreply@someemail.org" and no error exception is displayed.
Thanks in advance!
I have create a VF page which is a registration form. It is hosted on a Force.com site. What I want to do is this:
When a user enteres contact information, he will get an email notification containing a generic email address called "noreply@someemail.org" listed as the From: Email Header or Sender. I use Org wide Email Addressesmethod setOrgWideEmailAddressId to create this.
However that email doesn't appear and I get an error rmessage that says :
SendEmail failed caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, Not profiled to access this Org-wide Email.
Q) Does anyone know if I am receiving this error because the external user to the Force.com Site is of a profile type that is a Guest Site User and not one that is a Salesforce Licensed User like System Admin?
I ask this question because when I run a test locally for this VF Page within Salesforce (as a System Admin), the test user I use will get the email notification that does contain the Sender Header "noreply@someemail.org" and no error exception is displayed.
Thanks in advance!
First, I had to go to the user page for Homeschool Site Guesr User user record and then I edited the Email Address attribute by changing the previous value (which was an employee email address) to 'noreply@someaddress.com' . I then reran a test on the Sandbox Force.com Site page form and submitted the user information on that page form. The controller for the site then sends the user an email notification and I verified that the Sender or From email header was set to 'noreply@someaddress.com' . So I never really had to use Org Wide Email Address at all in my APEX code. I just had to make sure that the Site Guest User user record Email attribute was set to 'noreply@someaddress.com' .
Next, within the code I had the controller code setup the email using Subject, SenderDIsplayName,Replyto, and the BCC headers before sending the email.
I am still using Portal users but this should be the last project in using Protals for us.
All Answers
If you haven't done so already, may be you can check if that Org Wide Email Address has the profile of the sites user listed when 'Allow Only Selected Profiles to Use the From Address' is selected
First, I had to go to the user page for Homeschool Site Guesr User user record and then I edited the Email Address attribute by changing the previous value (which was an employee email address) to 'noreply@someaddress.com' . I then reran a test on the Sandbox Force.com Site page form and submitted the user information on that page form. The controller for the site then sends the user an email notification and I verified that the Sender or From email header was set to 'noreply@someaddress.com' . So I never really had to use Org Wide Email Address at all in my APEX code. I just had to make sure that the Site Guest User user record Email attribute was set to 'noreply@someaddress.com' .
Next, within the code I had the controller code setup the email using Subject, SenderDIsplayName,Replyto, and the BCC headers before sending the email.
I am still using Portal users but this should be the last project in using Protals for us.