Bug 352464

Summary: Regression kMail 5.0.0: HTML mails do not show external images
Product: [Applications] kmail2 Reporter: Gunter Ohrner <kdebugs>
Component: UIAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: a.skembris, adeptsmail, alexandre.sidorenko, bertrand.croq, danypv.wonder, fabio.coatti, graham, kdebugs, marc.olivier.laux+kde, montel, mtijink.bugs, philipp.woelfel, stephena, taohansen, winter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.2
Sentry Crash Report:
Attachments: Result of viewing a sent message containing a link to external image
Broken images with inline HTML images

Description Gunter Ohrner 2015-09-09 08:09:59 UTC
Send yourself an HTML email which references an external image located at a http URL.

After kMail receives and displays it, the resulting mail will not show the image at all or a "broken image" icon only.

Reproducible: Always
Comment 1 Gunter Ohrner 2015-09-09 10:20:07 UTC
Just a wild guess: Maybe kMail cannot download/display the image due to bug #352464?
Comment 2 Alex Sidorenko 2015-10-19 12:34:22 UTC
I have the same problem with KMail2 as shipped by Kubuntu-15.10 (beta2 updated daily)

---------------------------------------
Version 5.0.2
Using:
KDE Frameworks 5.15.0
Qt 5.4.2 (built against 5.4.2)
The xcb windowing system
---------------------------------------

An interesting thing is that correct images show up for a brief moment (probably < 0.2s), after that they disappear and I see 'broken' icons only.

For testing purposes, I have created a brand-new user (empty $HOME directory) and the problem is still there, so the issue is not due to old configuration files.

Alex
Comment 3 Alex Sidorenko 2015-10-23 12:13:13 UTC
A clean install of kubuntu-15.10 fixed the problem. So it was due to some old packages present on my host, not to stale files in $HOME
Comment 4 Allen Winter 2015-10-23 20:51:15 UTC
Gunter, fixed for you too?
If so, we can resolve.
Comment 5 Gunter Ohrner 2015-10-24 07:28:11 UTC
(In reply to Allen Winter from comment #4)
> Gunter, fixed for you too?
> If so, we can resolve.

It has not been fixed "just by itself."

I have not reinstalled so far and honestly I'm not really keen on doing so if it can be avoided in any way.

It usually literally takes months until the last bits and pieces of my system are back in place, especially seldom used applications or features which I only notice are missing when I try to use them - but which I need quickly in this case...

I wonder what may cause these issues which cannot be fixed by a fresh $HOME but will be resolved by a reinstallation. (Interesting side note/question for Alex: Did you restore your previous $HOME to your new installation, and images in kMail did still work?)
Comment 6 Alex Sidorenko 2015-10-24 19:19:01 UTC
Hi Allen,

I always use separate disk partitions (or different disks) for / and users. So I have reinstalled just the OS, then created and tested a new user (worked fine), then mounted the disk with old users (adding them to /etc/passwd as needed).

An yes, kmail for all 'old' users started working fine, showing external images.

Alex
Comment 7 Stephen Anthony 2015-11-05 02:11:50 UTC
Has anyone figured out what other package(s) on the system that could cause this?  I *really* don't want to reinstall. I can confirm that installing from scratch in a VM does work fine, and the images appear as they should.  Can anyone point me in the right direction as to what package could possibly cause such an issue??
Comment 8 Stephen Anthony 2015-11-09 00:45:02 UTC
I have since decided to reinstall, and the problem is still present, both with my old config files and a new user config files.
Comment 9 Philipp Woelfel 2015-11-24 07:50:31 UTC
Same problem on openSuSE Tumbleweed with KF5
Comment 10 Laurent Montel 2015-11-24 08:06:19 UTC
(In reply to Gunter Ohrner from comment #0)
> Send yourself an HTML email which references an external image located at a
> http URL.
> 
> After kMail receives and displays it, the resulting mail will not show the
> image at all or a "broken image" icon only.
> 
> Reproducible: Always

Could you send me an example ?
Comment 11 Stephen Anthony 2015-11-25 18:59:51 UTC
I have sent an email containing a link to a small PNG image from my personal webserver directly to your email address, Laurent Montel.  I didn't know if there was a way to include the message here, so I sent it directly.  Hopefully it won't be marked as SPAM.

Note that in kmail, I cannot view the image in the message from the 'Sent' folder, but I can see it when using Thunderbird.
Comment 12 Stephen Anthony 2015-11-25 19:46:35 UTC
Created attachment 95744 [details]
Result of viewing a sent message containing a link to external image
Comment 13 Laurent Montel 2015-11-26 11:25:26 UTC
I can see it .
I show external url and I show it.
So what is the problem ?
it's not automatic to show external url but it's normal
Comment 14 Stephen Anthony 2015-11-26 11:39:31 UTC
(In reply to Laurent Montel from comment #13)
> I can see it .
> I show external url and I show it.
> So what is the problem ?
> it's not automatic to show external url but it's normal

The problem is that whether or not I have "load external references" enabled, the image never appears, as shown in the attachment in comment 12.
Comment 15 Matthijs 2016-01-12 16:32:24 UTC
For me this also happens with embedded images. They do show up in other e-mail clients and gmail, but Kmail never shows them (with any setting for displaying attachments)
Comment 16 imraro 2016-01-13 08:56:21 UTC
Same behavior with embedded images (15.12.1).
Comment 17 Tao Hansen 2016-01-24 12:19:38 UTC
Created attachment 96812 [details]
Broken images with inline HTML images

The same behavior on an Arch Linux install with PostgreSQL backend. Oddly, it only happens if the email is sent from some HTML compose capable clients (Thunderbird in this case) but not in others (from MailChimp everything renders correctly).
Comment 18 Angelos Skembris 2016-01-27 09:50:41 UTC
I get a similar behaviour, on openSUSE RPMs, version 5.1.1. External images are shown but embedded are not. Same issue?
Comment 19 Marc-Olivier Laux 2016-02-04 13:03:23 UTC
I can confirm the problem with 5.1.1 on Netrunner rolling. Embedded images appears broken or forbidden, even with images embedded by kmail itself, through signature editor : the composer display it in the signature, but once the email is sent to myself, the image don't show.
Comment 20 Stephen Anthony 2016-02-04 20:21:10 UTC
As of the following updates to Ubuntu 15.10 (backported from 16.04):

Version 5.0.2
    KDE Frameworks 5.18.0
    Qt 5.5.1 (built against 5.5.1)

this problem is fixed for me.  I don't know if it was the new Kmail, or some other component that interacts with Kmail, but everything is fine now.
Comment 21 Bertrand Croq 2016-03-24 13:08:26 UTC
Same problem with KMail 5.1.3 on archlinux.

When I reply to a mail, the inline images appear in the composition window.
Comment 22 Fabio Coatti 2016-03-25 08:30:00 UTC
Same behaviour here: inline images are not shown, but on "reply" composition windows shows the images.

kmail 5.1.3
KDE Frameworks 5.20.0
Qt 5.5.1 (built against 5.5.1)

(gentoo kde overlay)
Comment 23 Yuriy Vidineev 2016-04-22 18:01:59 UTC
Kubuntu 16.04. Same problem :(
Comment 24 Bertrand Croq 2016-05-02 09:21:07 UTC
Fixed for me, using kmail 5.2.0 (package kmail 16.04.0-3 on archlinux)
Comment 25 Benoit Grégoire 2016-05-02 15:36:34 UTC
*** This bug has been confirmed by popular vote. ***
Comment 26 graham 2016-06-29 21:00:37 UTC
Can confirm same issue on Fedora-24; images (external or attached) that appeared in my mail prior to updating to F24 no longer appear.

Laurent... perhaps this error (going to STDERR) has something to do with it ...

  couldn't create slave: "Unable to create io-slave:\nklauncher said: Unknown protocol 'cid'.\n"

Doesn't go to my .xsession-error logs, but if I start kmail from a konsole window I get that error on each message that has an inline image attachment.
Comment 27 Marc-Olivier Laux 2016-06-30 06:51:53 UTC
Just to notify that the problem has gone for me too on net-runner/manjaro/archlinux, kmail 16.04.2-1 (at least)
Comment 28 Wonder 2016-10-09 22:17:57 UTC
I confirm this bug.
I use Linux Mint 18 KDE with Kmail 5.1.3.
Some mails with attach image, not viewing inline.
And for example, in one account, I have configured my signature, this signature contains images of my computer, when create a new mail, in windows of new mail appears my signature with the images.
Send this mail to other account, in Kmail not appears this images, but in Thunderbird appears fine.
Comment 29 Gunter Ohrner 2016-10-10 08:02:22 UTC
This now works for me in kMail 5.3.0. This bug is tagged as "fixed in 5.2", so you probably "just" need to wait for Linux Mint to upgrade your kMail package.

AFAIK kMail 5.1 is not supported any more and you won't get further bug fixes for it.