Hello all,
I've recently posted a bug reporting to the Roundcube community forum
We have noticed a strange behavior with a fresh Roundcube 1.2 install (no additional plugins enabled nor 'strange' custom config defined).


To reproduce this, send an e-mail using the html editor, leaving a blank content.


Received e-mail has a 'text/html' content-type (instead of the expected 'multipart'). therefore client view raw mime-parts as e-mail content.

Note that sent e-mail (taken from sender 'sent' mailbox) has the right content-type (multipart) so it's perfectly readable.


In addition, we have recorded a tcpdump session, that confirm our impression of having two separate libraries handling in a different way SMPT (for delivery) and IMAP (for storing e-mail within 'sent' inbox) sections; that's what we got:


IMAP SESSION (save e-mail to 'sent' mailbox) - Note the right mime-type and boundary here

* OK [CAPABILITY IMAP4rev1 AUTH=LOGIN AUTH=CRAM-MD5 ID LITERAL+] dbmail 3.2.3 ready.
A0001 LOGIN xxxxx@xxxxxx xxxxxxx
A0001 OK [CAPABILITY IMAP4rev1 ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE ID UIDPLUS WITHIN CONDSTORE LITERAL+ ENABLE QRESYNC] User utente1@mail.qa.schema31.it authenticated
A0002 LSUB "" Sent
* LSUB (\hasnochildren) "/" "Sent"
A0002 OK LSUB completed
A0003 LIST "" Sent
* LIST (\hasnochildren) "/" "Sent"
A0003 OK LIST completed
A0004 APPEND Sent (\Seen) {936+}
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="=_17681037babd7dadb94a79c2cf51cb1f"
Content-Transfer-Encoding: quoted-printable
Date: Thu, 14 Jul 2016 14:23:01 +0200
From: Utente di TEST <utente1@mail.qa.schema31.it>
To: stefano.gironella@gmail.com
Subject: prova 2
Organization: SC31
Message-ID: <a46919e3b0380e0dc85f82e475581740@mail.qa.schema31.it>
X-Sender: utente1@mail.qa.schema31.it
User-Agent: Roundcube Webmail/1.2.0

--=_17681037babd7dadb94a79c2cf51cb1f
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII


--=_17681037babd7dadb94a79c2cf51cb1f
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family: Verdana,Gen=
eva,sans-serif'>

</body></html>

--=_17681037babd7dadb94a79c2cf51cb1f--

A0004 OK [APPENDUID 2028 2695213] APPEND completed
A0005 LOGOUT
* BYE
A0005 OK LOGOUT completed



SMTP SESSION (e-mail dispatch) - Note that content-type here is 'text/html' (maybe taken from the first non-empty mime-part?)

220 litio.roma.schema31.it ESMTP Sendmail 8.14.5/8.14.5; Thu, 14 Jul 2016 14:23:01 +0200 (CEST)
EHLO localhost
250-litio.roma.schema31.it Hello [10.33.100.158], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-STARTTLS
250-DELIVERBY
250 HELP
MAIL FROM:<utente1@mail.qa.schema31.it>
250 2.1.0 <utente1@mail.qa.schema31.it>... Sender ok
RCPT TO:<stefano.gironella@gmail.com>
250 2.1.5 <stefano.gironella@gmail.com>... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Date: Thu, 14 Jul 2016 14:23:01 +0200
From: Utente di TEST <utente1@mail.qa.schema31.it>
To: stefano.gironella@gmail.com
Subject: prova 2
Organization: SC31
Message-ID: <a46919e3b0380e0dc85f82e475581740@mail.qa.schema31.it>
X-Sender: utente1@mail.qa.schema31.it
User-Agent: Roundcube Webmail/1.2.0

--=_6e4cf8211c48e997305a4faab4020297
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII


--=_6e4cf8211c48e997305a4faab4020297
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family: Verdana,Gen=
eva,sans-serif'>

</body></html>

--=_6e4cf8211c48e997305a4faab4020297--
.
250 2.0.0 u6ECN1Je026469 Message accepted for delivery
QUIT
221 2.0.0 litio.roma.schema31.it closing connection