gergo85 / oc-news

This is the simple news and newsletter plugin for October CMS and Winter CMS.
http://octobercms.com/plugin/indikator-news
MIT License
42 stars 29 forks source link

Mail content shows only the first line. #174

Open rothejs opened 1 year ago

rothejs commented 1 year ago

Hi,

thanks for providing this awesome plugin.

I found the following issue: If i only use template variables inside the mail template, then the html newsletter email will only show the first line. (The text mail contains all content). It does not matter how many whitespaces or breaks there are between the variables.

However this behaviour can be fixed if you add any non whitespace unicode character before and after the variables. In the meantime i have used the "empty space" (U+2800) character as it is not visible. You have any idea what is causing this issue?

October: v3.1.26 oc-news: latest master commit

Best regards.

TimFoerster commented 1 year ago

Can you provide the code of your mail template and the raw code of your received email? Do you have email tracking activated?

rothejs commented 1 year ago

Sure,

Email tracking and all extra fields are disabled.

Template: indikator.news::mail.email_en HTML: {{ introductory|raw }} Text: {{ plaintext }}

Original message:

New line


Just default layout without inline css:

MIME-Version: 1.0 Date: Tue, 13 Dec 2022 16:26:38 +0000 Content-Type: multipart/alternative; boundary=feSVl6sX

--feSVl6sX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Summary

New line

--feSVl6sX Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.= w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=3D"http://www.w3.org/1999/xhtml">

Test =20

Summary

© 2022 October CMS. All rights reserved.

--feSVl6sX--



I also did not expect to see html tags inside the plain text area, but you can see that there is the full message. In the content-cell block there is only the first line