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)
 
<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
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