This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I created the new HTML mail template. I sent it for me, but the email likes as plan text. When I opened the source of mail, I saw this:
<div id=3D"example">Lorem ipsum</div>
This is the example code. I used the latest (292) OctoberCMS.
Is it core bug or something else? Please help me, because my client would like to send html emails.
There is two way to send mail : html & text. HTML is the rich editor, and text, the plain editor. Make sure to put a text if the mail client can't receive HTML format email.
The RED is for content editor, the blue for text, and the green for HTML.
If you put HTML directly into the rich editor, it will be displayed as text. You must click the GREEN button, and then put your HTML.
Also, <div id=3D"example">Lorem ipsum</div>
is not a valid HTML. It should be <div id="3Dexample">Lorem ipsum</div>
. The editor dosen't support custom divs. But the layout does.
Last updated
The html layout of my e-mail is:
<html>
<head>
<style type="text/css" media="screen">
{{ css|raw }}
</style>
</head>
<body>
<header>
<img src="https://github.com/octobercms/october/blob/master/themes/demo/assets/images/october.png?raw=true" alt="">
</header>
<section>
<h1>Title</h1>
{{ content|raw }}
</section>
<footer>
Lorem ipsun
</footer>
</body>
</html>
I sent the test e-mail to myself. In Thunderbird the source code of e-mail is:
<html>
<head>
<style type=3D"text/css" media=3D"screen">
=
header {
text-align: center;
width: 400px;
}
section {
padding: 20px;
width: 400px;
}
footer {
text-align: left;
width: 400px;
}
</style>
</head>
<body>
<header>
=
<img src=3D"https://github.com/octobercms/october/blob/master/themes/=
demo/assets/images/october.png?raw=3Dtrue" alt=3D"">
</header>
=
<section>
<h1>Title</h1>
<p>Lorem ipsum=
dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidid=
unt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud=
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis=
aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu=
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sun=
t in culpa qui officia deserunt mollit anim id est laborum.</p>
<=
/section>
<footer>
Lorem impus
</footer>=
</body>
</html>
What code did you type into the actual template content in the backend? Where did you type it? Please post a screenshot of the template editor with the problematic template loaded.
1-6 of 6