Roundcube Community Forum

 

Formatting problem with message in plain text

Started by sirio, January 30, 2008, 04:44:08 PM

Previous topic - Next topic

sirio

I have searched the forum without results.
Does anyone have the same problem?
Replying in "plain text" to a received message written in "plain text" cause that the recipient receive a mail without formatting.
All the body of the replied message is one text line, no carriage return, except for the signature.
Changing in the composer the "Editor type" in html can solve the problem, but the default is "plain text" when replying to "plain text" and I think this should be the right behavior.
I'm using roundcubemail-trunk-r938-20071210. If anyone is using a different version without experiencing the same problem, I'd like to know what svn or trunk is. Thank U

fuchur

Hi!
I have Roundcube Relase Candidate 2 and we had the same (or very simaliar) Problem. Every Mail written in the plaintext-editor lost all line breaks at the recipient, not in Roundcube itsself, but in Outlook 2003.
We tested roundcube with more than 300 users and the problem occured only with Outlook. In Thunderbird is the opposite effect, here you can see every line break twice.
I was trying around a little bit and and figured out that the following patch solved this problem: (No users are complaining anymore about lost formatting for over two weeks, and we have about 2000 Mails a day)
The patch simply replaces any "crlf" with "lf" when the mail ist send.
I don't realy know if this ist the correct solution, because RFC2049 says: "[..]The result is that isolated CR and LF characters are not well tolerated in general; they may be lost or converted to delimiters on some systems, and hence must not be relied on. [..]"

But for me it works.
Use patch -p0 in the directory of sendmail.inc

sendmail.inc
265c265
<  $MAIL_MIME->setTXTBody(trim(str_replace("\r","",$message_body)), FALSE, TRUE);
---
>  $MAIL_MIME->setTXTBody($message_body, FALSE, TRUE);

sirio

Thanks fuchur,

I did some tests and this solution seems to be working correctly,now i apply the changes permanently and check if any of my 1200 users find any problem.
I think the Ticket #1484711 is for the same problem, i have suggested to read your solution.

Quote from: fuchur Hi!
I have Roundcube Relase Candidate 2 and we had the same (or very simaliar) Problem. Every Mail written in the plaintext-editor lost all line breaks at the recipient, not in Roundcube itsself, but in Outlook 2003.
We tested roundcube with more than 300 users and the problem occured only with Outlook. In Thunderbird is the opposite effect, here you can see every line break twice.
I was trying around a little bit and and figured out that the following patch solved this problem: (No users are complaining anymore about lost formatting for over two weeks, and we have about 2000 Mails a day)
The patch simply replaces any "crlf" with "lf" when the mail ist send.
I don't realy know if this ist the correct solution, because RFC2049 says: "[..]The result is that isolated CR and LF characters are not well tolerated in general; they may be lost or converted to delimiters on some systems, and hence must not be relied on. [..]"

But for me it works.
Use patch -p0 in the directory of sendmail.inc

sendmail.inc
265c265
<  $MAIL_MIME->setTXTBody(trim(str_replace("\r","",$message_body)), FALSE, TRUE);
---
>  $MAIL_MIME->setTXTBody($message_body, FALSE, TRUE);


camilo.mendez

Thanks....... este tambien funciona en mi caso O0 O0 O0...
y les agradezco y felicito por tan grandioso webmail...

Note: My english is very bad, i'm sorry.

till

Can someone verify if this bug still happens and update the ticket (on trac) accordingly. Can't reproduce it now since I don't have Outlook 2003.

Thanks in advance!