Roundcube Community Forum

Release Support => Pending Issues => Topic started by: trybowski on May 27, 2009, 06:19:05 AM

Title: Mixed newline types
Post by: trybowski on May 27, 2009, 06:19:05 AM
Hello everybody,
I have the following problem with RoundCube. In some parts of emails it sends \n and in other parts \r\n\.

My RoundCube runs on Debian Etch, and sends mail through PHP's mail() command (no SMTP server set)

When the mail_header_delimiter setting is set to autodetect:
  * headers are ended by \n
  * headers moved to another line are split by \r\n
  * newlines in content of the message are \r\n

This causes the error that when a header is split (with \r\n), some email programs see it as double newline and thus interpret it as end of header section.

Setting mail_header_delimiter to either \n or \r\n doesn't solve the problem. With \n the result is exactly the same as with auto detection.

With \r\n some more line endings are \r\n, but NOT ALL. Namely:
 * the final newline of the message is \n
 * newlines after Received, Delivered-To, Return-Path headers are \n
 * Subject is terminated by \n (but if it's split across the lines, those are still \r\n).

It seems something is seriously messed up. As far as I remember this started when I made an update of locales in my Debian installation. But I might be wrong -- maybe I just didn't notice it earlier.

Please help!
Title: Mixed newline types
Post by: trybowski on June 05, 2009, 06:22:58 AM
Really, nobody able to help?
Title: Mixed newline types
Post by: marcinx on March 08, 2010, 11:57:10 PM
I fixed the header problem by removing the "Add PHP Mailer Header" option in my PHP.ini. (You'd have to check what the exact key is).

I am still stuck with the double new lines in the body part of the emails though. Whenever I send messages through roundcube webmail they look horrible in any regular email client because of the double line breaks. Virtually impossible to read. I am NOT using HTML mode - I am using plain text.

Where in the code do I have to look to make sure that roundcube treats my carriage returns as \n and nothing else ?

Thanks

Marcin
Title: Mixed newline types
Post by: jurjen on June 28, 2010, 08:45:14 AM
i've issued a bug report for the double carriage return issue;
#1486819 (double carriage returns in mail body) ? Roundcube Webmail (http://trac.roundcube.net/ticket/1486819)

note that this only applies on using the php mail() function on a unix OS (linux etc.)
Title: Mixed newline types
Post by: dziobak on June 28, 2010, 09:02:34 AM
try current svn