Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed images when sending HTML E-Mail #13557

Open
ChargingBulle opened this issue Jan 13, 2019 · 4 comments
Open

Embed images when sending HTML E-Mail #13557

ChargingBulle opened this issue Jan 13, 2019 · 4 comments
Labels
1. to develop Accepted and waiting to be taken care of design Design, UI, UX, etc. enhancement feature: caldav Related to CalDAV internals feature: emails good first issue Small tasks with clear documentation about how and in which place you need to fix things in. help wanted

Comments

@ChargingBulle
Copy link

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?

  • privacy (readers can be sure that the NC admin does not track them)
  • usability (readers can see the images without clicking away a warning prompt)

Is this technically possible?

  • Yes, you can embed images. For example via MIME Content-ID or via inline embedding
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

Return-path: <[email protected]>
Received: ...
Original-recipient: rfc822;[email protected]
Sender: [email protected]
To: Me <[email protected]>
From: Me <[email protected]>
Subject: Test
Message-id: <[email protected]>
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

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <img src="cid:[email protected]" alt="">
  </body>
</html>

--------------885E82E985699C9CB72624B8
Content-Type: image/png;
 name="poclpdkelpocpgpa.png"
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
Content-Disposition: inline;
 filename="poclpdkelpocpgpa.png"

iVBORw0KGgoAAAANSUhEUgAAADgAAAASCAIAAACB04oZAAAAzUlEQVRIie2T0REDIQhEqYuC
qIdqaGaLMR9Rz1PGU+NMLpPbP0HXByKFHxF9G2BU/whqQlGsmMxeqwTNXqwIAcpxKTbjCOUO
Sj87CBptysCC7S1ATVKXiZjFvBsXQaGHN0u7ZQIUyiyGvDRldqZiBdTkHIVJbd2AUqVsYNIO
qxdbAHViTcuGO+rUEAv5GNQrtwmOPz08u0GUi+zWjoY0SYcjTHnL09fOQDv+VO4+zWXx1vkM
TMt/L3qY+aORTvaz7x0zv/7GekB36wHdrRcZX4h7tVmUbQAAAABJRU5ErkJggg==
--------------885E82E985699C9CB72624B8--

--------------63E36A7002E8D6FBEB9C5425--
@ChargingBulle ChargingBulle added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jan 13, 2019
@pirate
Copy link
Contributor

pirate commented Aug 15, 2019

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

@jancborchardt
Copy link
Member

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

@jancborchardt jancborchardt added 1. to develop Accepted and waiting to be taken care of design Design, UI, UX, etc. good first issue Small tasks with clear documentation about how and in which place you need to fix things in. help wanted feature: emails and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Apr 9, 2020
@narcisgarcia
Copy link

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

@joshtrichards
Copy link
Member

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: #17187 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of design Design, UI, UX, etc. enhancement feature: caldav Related to CalDAV internals feature: emails good first issue Small tasks with clear documentation about how and in which place you need to fix things in. help wanted
Projects
None yet
Development

No branches or pull requests

5 participants