Customize the Renderer URL setting in ECM/EXM


Description

The Renderer URL is the host name that is used to download the message source when a newsletter is being previewed and/or dispatched to recipients.

Starting from ECM 1.3 Initial release and up to EXM 3.4 Update-1, the URL is set automatically by ECM/EXM code (see the Release notes). However, in some environments, it may be necessary to configure this host name manually. For example, if there are multiple host names of the CM server used and you need to ensure that ECM will use the correct one and will not fail to render a newsletter just due to referring to an inappropriate host name. When using an inappropriate host name, you may experience issues like the following when previewing or dispatching emails:

The remote name could not be resolved.
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel (when secured host was chosen by ECM).

Note that in EXM 3.5 Initial release and higher the host name is specified in the RendererUrl setting in the "Sitecore.EmailExperience.Core.config" file. More detailed information can be found in "The EXM configuration settings".

Solution

To be able to specify the Renderer URL manually, you can implement a small extension.

Check the following example:

  1. Create a custom processor to update the Renderer URL with the value from a configuration file. For example:
    public void Process(PipelineArgs args)
    {
      GlobalSettings.RendererUrl = Settings.GetSetting("ECM.RendererUrl");
    }
  2. Add this processor to the <initialize> pipeline of the web.config:
    <pipelines>
    <initialize>
      ...
        <processor type="<your-processor-class-name, your-assembly" />
    </initialize>
  3. Specify the required value of the ECM.RendererUrl setting in the web.config. This address should be accessible from the ECM server (where the message is being created and dispatched) of your Sitecore environment:
    <settings>
    ...
      <setting name="ECM.RendererUrl" value="http://yourhost" />