eZ Community » Forums » Extensions » CJW Newsletter long line problem
expandshrink

CJW Newsletter long line problem

CJW Newsletter long line problem

Tuesday 15 March 2011 11:33:51 am - 4 replies

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

Tuesday 15 March 2011 5:52:14 pm

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

Tuesday 15 March 2011 8: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

Wednesday 16 March 2011 10: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

Modified on Wednesday 16 March 2011 10:36:37 am by Felix Woldt

Monday 28 March 2011 9: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

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from