function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hugues RaguetHugues Raguet 

Remove context user info in From field for MassEmailMessage

I have a provisioning process that creates users in SF and a trigger sends welcome emails, using mass emailing. The problem is that the 'from' field of the welcome email shows the email address of the technical user of the provisioning process. I saw in the forum a solution : define an organisation wide email address and use the method setOrgWideEmailAddressId. Unfortunatelly, this method does not work with the MassEmailMessage class. I have the same problem with the notification sent by SF to reinitiate the password.
Do you have any idea how to fix this ?