6

We are currently trying to improve spam-scores for our customers' email campaigns and have used the tool https://www.mail-tester.com/ which states that we are being penalized by not including a List-Unsubscribe header/functionality.

Does anyone know (or have implemented) functionality to the EXM pipeline that adds the List-Unsubscribe header to emails? Googling and the Sitecore knowledge base has failed me so far.

1 Answer 1

3

Assuming you're using EXM 3.3 (or later) this can be done by overriding the dispatchprovider. You'll find this element under /sitecore/exm/eds/dispatchManager in the configuration (Sitecore.EDS.Providers.CustomSMTP.config or Sitecore.EDS.Providers.Dyn.config) e.g.

<dispatchManager defaultProvider="default">
    <providers>
        <clear />
        <add name="default" type="Sitecore.EDS.Providers.CustomSmtp.DispatchProvider, Sitecore.EDS.Providers.CustomSmtp">
            <param ref="exm/eds/connectionPool" />
            <param ref="exm/eds/environmentIdentifier" />
        </add>
    </providers>
</dispatchManager>

You'll need to override the SetMessageHeaders method e.g.

protected override void SetMessageHeaders(EmailMessage message)
{
    base.SetMessageHeaders(message);
    message.Headers.Set("Your-Header-Name", "Your-Value");
}

In EXM 3.4 and later, this configuration element has changed and is now called

<dispatchProvider defaultProvider="default">
  <providers>
        <clear />
            <add name="default" type="Sitecore.EDS.Providers.CustomSmtp.DispatchProvider, Sitecore.EDS.Providers.CustomSmtp">
                <param ref="exm/eds/connectionPool" />
                <param ref="exm/eds/environmentIdentifier" />
            </add>
    </providers>
</dispatchProvider>
4
  • Is it me, or are your old and new snippets the same? Commented Jan 19, 2017 at 5:34
  • 3
    That's you :) <dispatchManager vs. <dispatchProvider Commented Jan 19, 2017 at 8:59
  • Touché, good sir Commented Jan 19, 2017 at 9:53
  • I am doing the same thing now. Question: how to get the context Contact ID from message.ContactId string which is somehow hashed? Commented Mar 14, 2017 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.