EXM does not respect context language when sending email notifications or redirecting contacts to selected links


Description

Sending a multilingual email campaign to contacts that have a preferred language different from the default one (English) can lead to incorrect links redirection or email notifications in the wrong language (English).

Solution

To resolve the issue, download and install the patch that forces EXM to use the message language to send notifications or redirect contacts to the selected links found on this page:
https://github.com/SitecoreSupport/Sitecore.Support.255287.255621/releases.

If there is a requirement to send subscription campaigns from custom code, make sure that the following class is used:

Sitecore.Support.EmailCampaign.Model.Messaging.SubscribeMessage

It contains an additional MessageLanguage property, which controls the language that is used to send a subscription message.

The following code sample demonstrates the work of the MessageLanguage property:

SubscribeMessage subsMess = new Sitecore.Support.EmailCampaign.Model.Messaging.SubscribeMessage()
{
  MessageId = Sitecore.Data.ID.Parse("{48731F06-84FA-44E4-A8C9-A30E73B3B8DF}").Guid,
  ContactIdentifier = identifier,
  RequireSubscriptionConfirmation = true,
  MessageLanguage = "de-DE"
};
ClientApiService.Subscribe(subsMess);