nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.34k stars 4.06k forks source link

Embed images when sending HTML E-Mail #13557

Open ChargingBulle opened 5 years ago

ChargingBulle commented 5 years ago

external resources are not automatically loaded in sanely configured E-Mail clients.

For example in Thunderbird a warning like this will pop up: warning bar of thunderbird

the NextCloud logo is fetched from https://yourserverhere.com/core/img/logo.png?v=3D0 which is opens the door for resource based tracking.

It's not just the NextCloud logo but all image resources. For example in an mail based invite the small icons like CALENDAR ICON and PLACE ICON will not be displayed when viewed in a many E-Mail client (for example Thunderbird with default settings)

Why change this?

Is this technically possible?

Technical Example Black and white image reading "Hello" is inserted into an HTML E-Mail via Content-ID. The image is base64 encoded inside the E-Mail ![email with small embedded image inside](https://user-images.githubusercontent.com/6533815/51085378-59942800-1738-11e9-93df-54717a75b342.png) ``` Return-path: Received: ... Original-recipient: rfc822;user@example.com Sender: user@example.com To: Me From: Me Subject: Test Message-id: <123e4567-e89b-12d3-a456-426655440000@example.com> Date: Sun, 13 Jan 2019 00:00:00 +0000 MIME-version: 1.0 Content-type: multipart/alternative; boundary=------------63E36A7002E8D6FBEB9C5425 Content-language: en-US This is a multi-part message in MIME format. --------------63E36A7002E8D6FBEB9C5425 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit --------------63E36A7002E8D6FBEB9C5425 Content-Type: multipart/related; boundary="------------885E82E985699C9CB72624B8" --------------885E82E985699C9CB72624B8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit --------------885E82E985699C9CB72624B8 Content-Type: image/png; name="poclpdkelpocpgpa.png" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="poclpdkelpocpgpa.png" iVBORw0KGgoAAAANSUhEUgAAADgAAAASCAIAAACB04oZAAAAzUlEQVRIie2T0REDIQhEqYuC qIdqaGaLMR9Rz1PGU+NMLpPbP0HXByKFHxF9G2BU/whqQlGsmMxeqwTNXqwIAcpxKTbjCOUO Sj87CBptysCC7S1ATVKXiZjFvBsXQaGHN0u7ZQIUyiyGvDRldqZiBdTkHIVJbd2AUqVsYNIO qxdbAHViTcuGO+rUEAv5GNQrtwmOPz08u0GUi+zWjoY0SYcjTHnL09fOQDv+VO4+zWXx1vkM TMt/L3qY+aORTvaz7x0zv/7GekB36wHdrRcZX4h7tVmUbQAAAABJRU5ErkJggg== --------------885E82E985699C9CB72624B8-- --------------63E36A7002E8D6FBEB9C5425-- ```
pirate commented 5 years ago

The images appear entirely broken for us in Gmail as well.

jancborchardt commented 4 years ago

@JavaZauber @pirate @mokken would you like to contribute a fix for this? Or do you have any pointers what is necessary to fix this? :)

narcisgarcia commented 2 years ago

Easier alternative for developer: Not using images at all. Composition seems to be implemented with IEMailTemplate.php

joshtrichards commented 1 year ago

Unfortunately when I looked at this awhile back I found inline embeds to be an obstacle if one care's about recipients using, say, Gmail. I don't recall finding a good path forward so that effort stalled out.

Similar to: https://github.com/nextcloud/server/issues/17187#issuecomment-692551296