3

How to view the email campaigns online in a multisite solution? Because the link always redirects me to the default site (Site1) even when the email campaign was sent in Site2 Email Root

This is what I did: with the view email which I added in the header:

@if (Request.QueryString["sc_pd_view"] != "1")
{
    <div style="margin: 10px 0; font-size: 10px; font-family: @Model.NewsletterOptions.FontFamily">
        @Html.Sitecore().Field(Templates.Header.Fields.ViewOnlineHavingTrouble, Model.ContentItem)
        &#32;
        <a href="/[email protected]&[email protected]&sc_pd_view=1">
            @Html.Sitecore().Field(Templates.Header.Fields.ViewOnlineClickHere, Model.ContentItem)
        </a>
    </div>
}

In each Email Manager root per site, I added the baseURLS: Site1: https://www.site1.com Site2: https://www.site2.com

In /sitecore/system/Settings/Email/System/Hostname Mappings, Created two hostname mappings enter image description here

But when I clicked the View Email Online link sent from SITE2, it always redirects me to the SITE1 url and only shows blank page.

Can you help me with this?

Below are the references:

How to open an Sitecore Email Experience Manager email in browser

https://doc.sitecore.net/email_experience_manager/configuring_the_delivery_process/link_generation_and_hostname_mapping_in_exm

3
  • Please post your <sites> configuration Commented Jun 5, 2018 at 22:13
  • 2
    Are you logged into site2 cms when sending emails from site2 email root? I think that hostname mapper is working the way that this is required so it can map host correctly. Could you try this out? Commented Jun 6, 2018 at 4:09
  • @PeterProchazka, the URL is now site2 after logging into the site2 cms and sending the site2 from its email root. however, i still getting blank page.
    – ZQuiray
    Commented Jun 6, 2018 at 11:58

1 Answer 1

1

I don't see the need for hostname mappings in your case. The mapping settings on your email manager root should be sufficient.

Try to create or move your email manager root under your sites rootpath.

e.g.

  • /sitecore/content/sites/site-A/<email-manager-root>
  • /sitecore/content/sites/site-A/homepage
  • /sitecore/content/sites/site-B/<email-manager-root>
  • /sitecore/content/sites/site-B/homepage

Next have your siteconfig like:

<site name="site-a" rootPath="/sitecore/content/sites/site-A" startItem="/homepage" ... />
<site name="site-b" rootPath="/sitecore/content/sites/site-B" startItem="/homepage" ... />
3
  • Yes that's what I did. and sites are defined in site.config with the correct configuration for each site. Now the view email online has the right link but showing blank page.
    – ZQuiray
    Commented Jun 6, 2018 at 12:01
  • The mail is in essence just another webpage with presentation details that can be called directly. Can you browse to it directly or preview it? Commented Jun 6, 2018 at 12:31
  • Thanks for the response. I am able to make it work by publishing the site and language version of the email root that I'm working with. All in all the configuration is correct.
    – ZQuiray
    Commented Jun 7, 2018 at 14:29

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.