Roundcube Community Forum

 

Mixed newline types

Started by trybowski, May 27, 2009, 06:19:05 AM

Previous topic - Next topic

trybowski

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!

trybowski

Really, nobody able to help?

marcinx

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

jurjen

i've issued a bug report for the double carriage return issue;
#1486819 (double carriage returns in mail body) ? Roundcube Webmail

note that this only applies on using the php mail() function on a unix OS (linux etc.)

dziobak