Roundcube Community Forum

Release Support => Pending Issues => Topic started by: xereeto on April 15, 2013, 05:15:49 PM

Title: Major issue with HTML editing - HTML content-type is not sent
Post by: xereeto on April 15, 2013, 05:15:49 PM
Hi,

I just installed RoundCube on my mail server - it is great! But I have one problem with it - sending HTML messages doesn't work.
When I send an HTML message, it is actually sent as plain text, and the recipient receives the HTML code as text (if that makes sense).

The problem seems to lie in the content type. When I send a formatted message from Thunderbird, this is the email headers:

Date: Mon, 15 Apr 2013 21:53:42 +0100
From: Matthew Hynes <[email protected]>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4
MIME-Version: 1.0
To: Matthew Hynes <[email protected]>
Subject: Test HTML again.
Content-Type: multipart/alternative;
boundary="------------060707030004010403030006"

This is a multi-part message in MIME format.
--------------060707030004010403030006
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

test text

_*/BIGGER FONT/*_

--------------060707030004010403030006
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <img alt="test text"
src="http://static.guim.co.uk/sys-images/Guardian/Pix/pixies/2012/10/4/1349367528590/Helix-nebula-009.jpg"
      moz-do-not-send="true" width="460" height="276"><br>
    <br>
    <u><b><i><big><big><big><big><big><big><big>BIGGER FONT</big></big></big></big></big></big></big></i></b></u><br>
  </body>
</html>

--------------060707030004010403030006--


The picture and the text are just random, it was the first result on a google search for 'image'.
However, note the "Content-Type: text/html; charset=ISO-8859-1".

When I send HTML email via Roundcube, these are the headers:

MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Date: Tue, 16 Apr 2013 00:46:15 +0400
From: Matthew Hynes <[email protected]>
To: <[email protected]>
Subject: HTML messages
Organization: (my small startup)
Reply-To: [email protected]
Message-ID: <73d4bf7f55f5c927261875b77e85ab75@localhost>
X-Sender: [email protected]
User-Agent: RoundCube Webmail/0.3.1

<p><span style="text-decoration: underline;">Come on, work.</span></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><img title="Frown"
src="http://mail.-----mydomain-----.co.uk/program/js/tiny_mce/plugins/emotions/img/smiley-frown.gif"
border="0" alt="Frown" /><br /></span></p>


The message is sent as text/plain, when it should be text/html. As such, when I receive the message, I get


<p><span style="text-decoration: underline;">Come on, work.</span></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><img title="Frown"
src="http://mail.-----mydomain-----.co.uk/program/js/tiny_mce/plugins/emotions/img/smiley-frown.gif"
border="0" alt="Frown" /><br /></span></p>


instead of rendered code.

How would I fix this? I've tried searching for an answer, but noone else seems to have had the same problem.

Thanks,

Matthew
Title: Re: Major issue with HTML editing - HTML content-type is not sent
Post by: SKaero on April 15, 2013, 06:19:07 PM
What version of RoundCube? Are you using any plugins?
Title: Re: Major issue with HTML editing - HTML content-type is not sent
Post by: xereeto on April 15, 2013, 06:53:35 PM
According to index.php, I have Roundcube version 0.3.1-20091031.

This is a fresh install, I have no plugins.

Thanks,

Matthew
Title: Re: Major issue with HTML editing - HTML content-type is not sent
Post by: ABerglund on April 15, 2013, 06:54:55 PM
0.3.1 is ancient. Version 0.9.0 was released today. You need to start over with a newer version, preferably the latest.
Title: Re: Major issue with HTML editing - HTML content-type is not sent
Post by: xereeto on April 15, 2013, 07:00:04 PM
Oh, did not know that. I installed from the Debian repos, which is probably why it's so old.

Can I update directly, or do I have to apt-get purge and start anew with a tar archive?

Thanks

Matthew
Title: Re: Major issue with HTML editing - HTML content-type is not sent
Post by: ABerglund on April 15, 2013, 07:09:46 PM
Considering the great differences, I'd purge and install the new from the tarball. Installing roundcube from scratch is really very simple, especially if you enable and use the web installer.
Title: Re: Major issue with HTML editing - HTML content-type is not sent
Post by: xereeto on April 15, 2013, 07:18:25 PM
After I posted, I went ahead and downloaded the new version, I noticed it had an UPGRADING file, so I followed the instructions there and everything seems to have worked fine. If I run into any problems I'll reinstall from scratch (or should I just do that anyway?)

Thanks

Matthew
Title: Re: Major issue with HTML editing - HTML content-type is not sent
Post by: ABerglund on April 15, 2013, 07:31:04 PM
If it is working, I wouldn't mess with it any further.