3

I have a requirement to send an email with View in Browser link. On clicking the link, it has to open the mail in browser. We need to implement this by using EXM Template.

Is there a solution for this in Sitecore EXM?

1

In a default installation, the Email Experience Manager (EXM) contains a number of predefined templates and import options. One of the predefined template is Newsletter : a template with a header containing a link to the online version of the email campaign and a footer with links to opt-out pages.

If you download EXM 3.4.2 from: https://dev.sitecore.net/Downloads/Email_Experience_Manager/Email_Experience_Manager_34/Email_Experience_Manager_34_Update2.aspx

you will see inside the package Email Experience Manager 3.4.2 rev. 170713 NOT SC PACKAGE.zip a zip file with the next name. Email Experience Manager Sample Newsletter 3.4.2 rev. 170713.zip . On this zip file is an example how to view newsletter in browser.

Normally you add the link in the header of the newsletter in this way:

@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="/?sc_itemid=@Sitecore.Context.Item.ID&sc_lang=@Sitecore.Context.Language.Name&sc_pd_view=1">
            @Html.Sitecore().Field(Templates.Header.Fields.ViewOnlineClickHere, Model.ContentItem)
        </a>
    </div>
} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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