We have been using Newsletter Studio to send our a client's newsletter for several years. We recently redeveloped their site so are now using the new version of the package (v2.1.6) on an Umbraco 7.5.7 site.
We have found however that single line comments (we use conditional comments to target specific clients) seem to be getting stripped out unless the comment has a line break. So for example this comment will be stripped out
<!--[if mso]><p>hello outlook</p><![endif]-->
but this one wont
<!--[if mso]>
<p>hello outlook</p>
<![endif]-->
This didn't happen on the old site which used version 1.4.4.1.
Is there something in the newer version of Newsletter Studio that is stripping out single line comments.
The template is stored as a skin. And we don't have any custom render tasks. It's a basic install of Newsletter Studio.
I've added the skin I've been using for testing. The "content" is a single string of text in the RTE. When I send out an email using this skin any piece of content surrounded with in a comment with line breaks shows in outlook, the one without doesn't.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
<head>
<title>test</title>
</head>
<body>
<!--[if mso]>
<p>hello outlook 2007+</p>
<![endif]-->
<!--[if (gte mso 9)|(IE)]>
<p>hello other outlook</p>
<![endif]-->
<!--[if mso]><p>this will get stripped out</p><![endif]-->
<!--[if mso]>
<p>this will not get stripped out</p>
<![endif]-->
[content]
</body>
</html>
In the actual newsletter the comments are included throughout the email and all seem to be getting stripped out.
Yes, we've sent it through a SMTP server to a real address. The setup is exactly the same as it was with the old site as we've just uploaded it to the same server.
When I tried using Papercut to intercept the email I get this as the message body
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
<title>test</title>
</head>
<body>
<!--[if mso]>
<p>hello outlook 2007+</p>
<![endif]-->
<!--[if (gte mso 9)|(IE)]>
<p>hello other outlook</p>
<![endif]-->
<!--[if mso]>
<p>this will not get stripped out</p>
<![endif]-->
<p>this is some content in an email</p>
</body></html>
The single line comment is gone, so it does seem as though the email body isn't getting out of Umbraco fully intact.
p.s. Thanks for pointing me in the direction of papercut. I was looking for something that could intercept the message.
I've managed to strip this down to the "PreMailer"-feature that was shipped a couple of versions ago. This feature basically inlines css as attributes on the elements. For some reason the premailer removes this the comment.
I will file this as a bug and try to see if we can create an update to the premailer - if you would like to run without the premailer (v1 did not have it so if you have been fine so far you should be that now) you can comment out the last render task in /config/newsletterStudio.config.
Single line comments being stripped out
We have been using Newsletter Studio to send our a client's newsletter for several years. We recently redeveloped their site so are now using the new version of the package (v2.1.6) on an Umbraco 7.5.7 site.
We have found however that single line comments (we use conditional comments to target specific clients) seem to be getting stripped out unless the comment has a line break. So for example this comment will be stripped out
but this one wont
This didn't happen on the old site which used version 1.4.4.1.
Is there something in the newer version of Newsletter Studio that is stripping out single line comments.
Hi!
Sorry to hear about your issue, I'll help you out!
Do you have your templates stored as "Skins" or are you using the core-Templates in Umbraco?
Is this on the first line or just in the middle of the template?
Do you have any custom render tasks or so configured?
// m
The template is stored as a skin. And we don't have any custom render tasks. It's a basic install of Newsletter Studio.
I've added the skin I've been using for testing. The "content" is a single string of text in the RTE. When I send out an email using this skin any piece of content surrounded with in a comment with line breaks shows in outlook, the one without doesn't.
In the actual newsletter the comments are included throughout the email and all seem to be getting stripped out.
Hmm..
I'm not really following along with where the issue is taking place.
Do you send this trough a SMTP to a real address? Same setup as you had with the v1-version of the package?
What if you send to a "fake smtp" like Papercut and look at the content of the email?
Hi Markus
Yes, we've sent it through a SMTP server to a real address. The setup is exactly the same as it was with the old site as we've just uploaded it to the same server.
When I tried using Papercut to intercept the email I get this as the message body
The single line comment is gone, so it does seem as though the email body isn't getting out of Umbraco fully intact.
p.s. Thanks for pointing me in the direction of papercut. I was looking for something that could intercept the message.
Hi!
Nice to hear that you liked Papercut =D I use it all the time =D
Okey, strange issue, I'll have to look closer at this - I guess that you could have the line break as fix meanwhile?
Sorry again for the inconvenience.
// m
I'm hoping the client will be done with sending newsletters for the year :p but if not I'll make sure to include a line break in the comments.
Thanks for your help on this Markus.
Hi again!
I've managed to strip this down to the "PreMailer"-feature that was shipped a couple of versions ago. This feature basically inlines css as attributes on the elements. For some reason the premailer removes this the comment.
I will file this as a bug and try to see if we can create an update to the premailer - if you would like to run without the premailer (v1 did not have it so if you have been fine so far you should be that now) you can comment out the last render task in /config/newsletterStudio.config.
Hope this helps you - I'll ping this thread when there is an update that's relevant to this issue.
Thanks for looking into this Markus :)
We'll switch off the PreMailer for now and await an update.
Hi!
A fix for this is now included in the latest release 2.1.9.2.
https://www.newsletterstudio.org/download/
Hop that this solves your issues!
// m
is working on a reply...