Email Templates as Html

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hi All,

I am changing my email templates and I want them to be send as HTML.
I write directly the code into the Body element of the concrete template - lets say "New Member". I write it without any escaping, directly:

<html>
<head>
<style>
...
</style>
</head>
<body>
<h1>Test Content</h1>
</body>
</html>

But it comes in the destination mail is plain text.
I saw that the body value is escaped on back-end side.

Is there any flag to raise in the admin panel for this setting and the templates to know that I send html code?

Or which is the right way to achieve that?

nopCommerce v3.7

Regards,
Boris
7 years ago
Sorry for the stupid question

but did you put your HTML-code in Sourcecode? That is Tools -> Source Code in the WYSIWYG

Regards
Nic
7 years ago
I test my html code and embedded css in index.html file locally on my machine and test it in some browsers. Then I copy the code in the body of the message template but it does not works.
7 years ago
I doubt that no one knows.

Any suggestions?
7 years ago
With encoding the html it still does not work.

Any suggestions?
7 years ago
The message templates are html by default.
The opening and closing html and body tags are already defined within the core code that generates the messages.

If you have additional html that you want to include in the message template, then Nic's suggestion above is how to achieve it.
Simply open the message template in admin area to edit it. Then click the tools menu in the editor and choose Source Code. Put your html in here with no body, head, or html tags.
7 years ago
Oh, I understood that to put it somewhere in the sourcecode of my project ( :
Now I understand and it works.

Very thanks ( :

Boris
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.