Roundcubemail: Inline images shown as attachments

Created on 17 Aug 2017  路  7Comments  路  Source: roundcube/roundcubemail

I just received a mail from an online shop with inline images but the images don't appear in the mail. I see them as attachment PartXX.bin.
There's some information from the mail source:
The e-mail is a multipart/mixed mail:

Content-Type: multipart/mixed; 
        boundary="----=_Part_9_958628515.1502433972518"

The first part is a quoted-printable encoded html message:

------=_Part_9_958628515.1502433972518
Content-Type: text/html; charset="ISO8859-2"
Content-Transfer-Encoding: quoted-printable

This is the reference to an inline image:

<img src=3D"cid:logo_jmhu.jpg" alt=3D"=" title=3D""/>

And this is the inline image itself:

------=_Part_9_958628515.1502433972518
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Disposition: inline
Content-ID: <logo_jmhu.jpg>

What's the problem with this e-mail?

MIME parsing bug enhancement

All 7 comments

This should be multipart/related not multipart/mixed. If other clients support this we could consider adding support for this too. Does it work in other clients?

Thunderbird does not display such an image. However, I think we could be smarter here.

Done.

I just checked this and I see it's working. Thanks.

Hello.
Messages from iPhone with "images as attachment" (inline) not show attachments in interface,
and not show images as images in preview.

Roundcube Webmail 1.4-git
plugins: archive, zipdownload

some parts of message
Content-Type: multipart/mixed; boundary=Apple-Mail-DDD609FE-70F8-4FF6-8EA6-A98ADB389C4A
Content-Transfer-Encoding: 7bit

--Apple-Mail-DDD609FE-70F8-4FF6-8EA6-A98ADB389C4A
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: 7bit

--Apple-Mail-DDD609FE-70F8-4FF6-8EA6-A98ADB389C4A
Content-Type: image/png;
name=IMG_2526.PNG;
x-apple-part-url=311BA36B-D71D-4CBF-9ECA-68168C4121FE
Content-Disposition: inline;
filename=IMG_2526.PNG
Content-Transfer-Encoding: base64

file: rcube_imap.php

original code

if (!empty($part[3])) {
            $struct->content_id = $part[3];
            $struct->headers['content-id'] = $part[3];

            if (empty($struct->disposition)) {
                $struct->disposition = 'inline';
            }
        }

if add this part(or change previous) inline images show as attachments in interface rc

if (!empty($part[1])) {
            $struct->content_id = $part[1];
            $struct->headers['content-id'] = $part[1];

            if (empty($struct->disposition)) {
                $struct->disposition = 'inline';
            }
        }

please check this

Ok, I'll reopen this as I have a similar case.

Fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jfcherng picture jfcherng  路  5Comments

Rotzbua picture Rotzbua  路  5Comments

bes-internal picture bes-internal  路  4Comments

rcubetrac picture rcubetrac  路  6Comments

julianwap picture julianwap  路  3Comments