Using CMS pages as email template

Vote:
 

Hi guys,

I'm trying to create on my web site, a page who will be used as email template. The template will be edited by a CMS editor, then it will be retrieved from my backend and sent via SMTP service. My template have the following format: Subject(String), Header(XhtmlString), Body(XhtmlString), Footer(XhtmlString). The XhtmlString properties are edited with TinyMCE.

The problem is when the CMS editor add link to the current web site via External link option, the link has been rewritten in the format EPiServer/CMS/Content/,,{pageId}/?epieditmode=False. Is possible to disable this rewriting for this template pages? In previous version of the CMS(version 7.0) we don’t have this problem.

Thanks.

#80492
Jan 23, 2014 14:36
Vote:
 

Hi Lena!

Links are generated with different format depending on which "mode" a request is done with. For instance, when editing a page, we have a different format that is not dependent on the URL segments  (since these might change during editing) and that also includes the version. How are you generating the email? In a scheduled job, through a page template on the site or something else?

#80613
Jan 28, 2014 7:27
Vote:
 

Hi Linus,

Thanks a lot for the response.

The email is generated in the following way. I've got simple CMS page with some placeholders for email template. Then this page has been retrieved with DataFactory.Instance.GetPage. Then the content is extracted as simple string and the placeholders are filled with data. Then this string is send inside message via SMTP. I don't use scheduled job, it's manually triggered.

The problem is when on the CMS page(the template) are added links to the current web site. The I have publish the page, the links are rewritten to the format described in my first post and if I send the template with the rewritten links, the customer won't be able to properly navigate to the web site after he receive the email.

#80650
Jan 28, 2014 14:20
Vote:
 

Hi again!

I'm trying to figure out what you are doing but I'm a bit puzzled. Are you using the built in template system in EPiServer? If so, you should not have to fetch the page yourself from DataFactory. Could you create a simple template so that I can reproduce the issue?

#80722
Jan 30, 2014 13:45
Vote:
 

Hi Lena,

When you say "the CMS editor add link to the current web site via External link option", do they write/copy & paste som urls to the External link field? Do they select a Page in the Page field?

#80753
Jan 31, 2014 8:31