You need to sign in to do that
Don't have an account?
Radnip
Using mail.setOrgWideEmailAddressId requires authorisation.
I'm trying to do the following in Salesforce Sites:
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); String[] toAddresses = new String[] {opp.Owner.Email}; mail.setToAddresses(toAddresses); mail.setOrgWideEmailAddressId('0S2B00000008OXA');
But whenever I use/set the setOrgWiseEmailAddressId Salesforce sites says that I need authorisation. I just want to change the from address in the email. Can you use organisational wide email addresses in Salesforce Sites?
Hi,
I have used this for sites also and its working. I think you are geting this error because the email which you are geting through the query is not authorized. Please check that email status inside Organization-Wide Email Address(Setup->AdminSetup->EmailAdministration->Organization-Wide Email Address) that it is verified or not??????
Think this will help you.
Yes, its right, org wide email address must be verified before use .
Yes it was verified but still didn't seem to work :(