5

We have two salesforce users A and B with different profiles.

B would like to send an email to our customer record in Salesforce but would like the email to be generated as if sent from A.

Is this possible ?

I looked into Messaging.SingleEmailMessage and found out that while we can set the Bcc/CC addresses, there is no for me to set the "from address".

Can someone let me know their ideas on this ?

Thanks !

4
  • This user A context, how is it identified? Will it vary on email by email basis or will remain same for all others emails as well? Commented Jun 7, 2017 at 0:44
  • Tx for the response..User A will vary on email by email basis
    – VPY
    Commented Jun 7, 2017 at 0:50
  • Another question, will the receivers be replying back to email received? Or just the User name A should appear as "Sender Name" and email address doesn't matter. Commented Jun 7, 2017 at 0:51
  • Our customers will respond to the emails sent to them so the email address should contain A's address...I know its asking a lot :(...Just wanna check whether it is at all possible
    – VPY
    Commented Jun 7, 2017 at 0:53

1 Answer 1

4

I suspect it isn't currently possible. You could use setSenderDisplayName(String displayName) to change the from Name, but it won't change to reply email address.

The alternative is to use an OrgWideEmailAddress, which will also change the sending Email Address in addition to the Display Name.

Crazy idea, make Organization-Wide Email Addresses for all the users who need to appear in the from address and put them in the same profile as the actual sender. Then associate the ID with the user and set it via setOrgWideEmailAddressId. Will need some config, but it should work.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .