T
T. N. T.
Hello
Since I'm using Rails 2.3.8 with Ruby 1.9.2 the sent emails are cut-off
at the end. Not always but only in non-multipart mails where the headers
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
apply to the content (in multipart mails Tmail makes the text/plain-part
have Content-Transfer-Encoding: Quoted-printable).
This fixes the problem:
module Net
class IMAP
def send_literal(str)
put_string("{" + str.bytesize.to_s + "}" + CRLF)
@continuation_request_arrival.wait
raise @exception if @exception
put_string(str)
end
end
end
The change is "str.length.to_s" -> "str.bytesize.to_s".
Regards, T.
Since I'm using Rails 2.3.8 with Ruby 1.9.2 the sent emails are cut-off
at the end. Not always but only in non-multipart mails where the headers
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
apply to the content (in multipart mails Tmail makes the text/plain-part
have Content-Transfer-Encoding: Quoted-printable).
This fixes the problem:
module Net
class IMAP
def send_literal(str)
put_string("{" + str.bytesize.to_s + "}" + CRLF)
@continuation_request_arrival.wait
raise @exception if @exception
put_string(str)
end
end
end
The change is "str.length.to_s" -> "str.bytesize.to_s".
Regards, T.