You need to sign in to do that
Don't have an account?
How is Return Path email set?
I'm working to solve an issue where my Controller Class sends an email. I set the ReplyTo and I set the SenderDisplayName those are both correct however. The email visually displays another users email that is no longer at the company. I can't understand or trace how this is being set. When I look at the mail details I see that the return path shows the old users email. We are not using Org Wide Defaults. How else could this from email address be set?
Since you are sending email via apex code I believe the only way to override the from email address would be to set a org wide email. You can do this by
- In your code use mail.setOrgWideEmailAddressId(ID) which requires the ID of an Organization-Wide Address
- Set your org wide email at Setup | Email Administration | Organization-Wide Addresses
Org wide addresses let you specify both the Display Name and the Email Address in From line of your outgoing mails. Hope this helpsCould you post the apex class you are having the issues with as well?