This issue is driving me nuts. Basically, I have an APEX trigger which is supposed to send out emails to customers when new records are available for them to look at.
Everything is working as expected. Except the sender name on the email which is the "From address"
I read the documentation and called these methods as follows:
// Specify the address used when the recipients reply to the email. mail.setReplyTo('[email protected]'); // Specify the name used as the display name. mail.setSenderDisplayName('Test Org Account Team');
But the "from address" still shows my email because the trigger is executed by my user.
When the reply button is clicked, the sender is populated to the email address set above. But I do not want my email to show up on the "From address".
Looks like Salesforce is defaulting this to the person who ran the trigger. How can I override this :( ?