Forums / Extensions / CJW Newsletter long line problem

CJW Newsletter long line problem

Author Message

Nicklas Lundgren

Tuesday 15 March 2011 3:33:51 am

Hi folks,

I am running the great CJW Newsletter in a few sites, with really good results. However, now I have run into a problem.

So - I am curious if anyone else has had the same trouble, and possibly has a solution.

The problem is that in html output format, everything created in the editor is sent without any line breaks.

That is, all the html content generated by attribute_view_gui is generated as one loooong line of html code.

This works out fine in previews, as a web browser doesnt care.

However - Sendmail obviously has a limit to the line length in emails, and puts an exclamation mark (!) followed by a line break when the line reaches the limit.

This breaks the newsletter text flow, and we get unpredicatable results when sending.

I would appreciate any suggestions on this matter.

Cheers,

Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Donat Fritschy

Tuesday 15 March 2011 9:52:14 am

Hi Nicklas

thanks for the feedback. You are most probably right about the limitation, as this thread shows. We will certainly look into it.

Regards,
Donat

http://www.cjw-network.com

http://www.webmanufaktur.ch - Developers united in eZ Publish: http://www.cjw-network.com

Nicklas Lundgren

Tuesday 15 March 2011 12:36:52 pm

Hi Donat,

Interesting thread you referred to! So I guess the solution lies in limiting the line lenght somehow...

Looking forward to any ideas on how to handle this issue.

Best regards,

Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Felix Woldt

Wednesday 16 March 2011 2:34:13 am

Hi Nicklas,

yes this is an interesting topic.

For a short workaround, we could extend the |cjw_newsletter_str_replace( ..., ...) operator in the skin html.tpl.

"
cjw_newsletter_str_replace( array( '<p>' ), array( '\n<p>) )
"

which is adding a linebreak before every p tag.

I final solution would be to automatically wrap the lines in html and text mode.

Can you give me feedback if the workaroud is working for you?

Thank's Felix

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter

Nicklas Lundgren

Monday 28 March 2011 12:26:57 pm

Hi Felix,

Sorry for the delay with my reply.

I found out that I first of all needed to upgrade to RC1 from Beta. It took a while, but now I am happy to say that your suggestion above did help!

With that solution, every paragraph renders on separate lines. That should be good enough in most cases. I cant imagine anyone writing one paragraph longer than 1000 characters...

So - thanks for great assistance.

And while I am at it... I think I have found another problem. Maybe it should be in a new thread, but I start here:

Have you tried to embed a file (pdf or alike) in a newsletter edition? I notice that the pdf-icon dont show up. And I see why - it renders with a relative URL, which of course is useless in an email.

Maybe you have a solution to this problem as well, before I start digging into templates...

Thanks for good help!

Cheers,

/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden