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

Email Notification from Org Wide Address
Hi All,
I needed to send an email notification on opportunities with conditions too complex for a workflow rule, so I created a trigger that checks the conditions and sends the email. I was successful on doing this, but now only problem I have is that the notification needs to be sent from a general address (org wide address), and this address should be available only for the trigger, not for the users. But if I do not add the profiles of the users to the org wide address, I get the following error:
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
On the other hand, if I give access to the profiles, then the org wide address is available whenever the users want to send any email message.
Does anyone know how to use the org wide address in a trigger without providing access to the user’s profile? Any other solution like running the code always under another user (i.e. system admin)?
Thanks in advance!
Not sure what exactly you are trying to do here, but you can send email with the regular SF outbound email service. You can set the "Reply-To" attribute to your custom email address, so that when users reply to the email, it goes to your custom org-wide mailbox.
Sample code is here :- SF Documentation
Let me know if this helps or you are trying to do something else.
Trying to do the exact same thing here. Were you ever able to get this solved? I don't like the "Reply-To" only option.
Thanks!