Email Sender Different In Lightning Vs. Classic

emailemail-templatelightningsalesforce-classic

If a user sends an email from an Opportunity the sender is different in Lightning. In Classic the sender is the name of user with the org-wide email address as email while in Lightning only the org-wide email address is being used as the sender – the name of the user is not shown.

To reproduce set up an org-wide email address and then have the user set their Email Name to MyCompany | John Doe and their Email Address to [email protected] (the org-wide email address). You can find both under Settings –> Email –> My Email Settings. Then you just send a simple email from the Opportunity, selecting MyCompany | John Doe <[email protected]> as the sender.

If you now compare the email header from both tests – this is what you should get.

Classic

From MyCompany | John Doe <[email protected]>
Subject Test Classic
MIME-Version 1.0
Content-Type multipart/alternative;
X-Sender [email protected]
X-SFDC-EmailCategory emailAuthorEmail

Lightning

From "[email protected]" <[email protected]>
Subject Test Lightning
MIME-Version 1.0
Content-Type multipart/mixed;
X-Priority 3
X-Sender [email protected]
X-SFDC-EmailCategory apiSingleMail

What I find odd are the missing quotes in the from address of the test in Classic – but aside from that you can clearly see that they are different. Then we have some minor differences in the MIME-Version etc. – but the most interesting thing seems to be X-SFDC-EmailCategory where we have emailAuthorEmail in Classic vs. apiSingleMail in Lightning. The first option kind of sounds like an email that is "authored" by the user as it was set up in their email settings (see above).

Maybe the difference is always there? Maybe the problem only becomes apparent when the user has set up their email settings with an org-wide email address? Maybe there's an option that I missed? I don't know. Did anybody else notice the same? Is this a bug or a feature?

Best Answer

Turns out this is indeed a bug:

A bug is now created to remove the Discrepancy in the Form Name for the emails sent from Lightning Experience when the use email address matches with an Org Wide email address. By Design only the Org wide email address will should be available in the From address field when composing an email on a non-case objects in case of duplicate email address.

It seems this only happens in a particular scenario when

  • you're in Lightning
  • and the user's email address is set to an email that is not yours
  • and the email address being used matches an org-wide email address.

A bug ticket has been created by Salesforce but sadly there's no workaround in the meantime. I will update this answer when the bug is fixed.

Related Topic