URLS for images in emails

I’m calling this a feature because I’m not sure if it is a bug.

I still have hundreds of subscribers to my list on the old listserver (mailman) and am relaying posts to it for now, that’s likely to continue for months.

But posts with images in them aren’t coming through. The mailman system was never set to support including graphics, but I was hoping that the email versions would have a full URL.

What I’m seeing in the emails is something that looks like this:
followed by

What I need is the full URL, more like this:
followed by
followed by

Is this possible?

Emails do contain full URLs for images.

We send two email “parts”:

  • “Content-Type: text/html” contains fully cooked HTML, and images use full URLs and render fine on GMail, for example.

  • “Content-Type: text/plain” ships the original markdown from the post “raw”, and will show the upload code markdown in the email as we do not runs transformations in there.

What appears to be getting to the old listserver is the text segment only, but something even stranger is going on. The user ID I’m using to relay posts to the mailman server is getting changed from being in mailing list mode to not being in mailing list mode, and when that happens posts stop being relayed completely. This has happened twice already today.

I think what’s happening with the relay account getting unset is that the relayed posts have the unsubscribe link for the discourse server and folks are clicking on that, which unsubscribes the relay user id.

For now I’ve edited out the one-click unsubscribe link to the discourse server. I need to see if I can figure out a way to do that at the mailman server rather than in discourse.

Update: I did get this cleaned up at the mailman end.

I don’t think this is related to the original question I raised, but I’m still trying to figure out if mailman is messing with the HTML segment of relayed messages.

Update2: I found a mailman setting that had to be changed.

1 Like

Sorry for pushing this topic up again, but I’m wondering if we can have two features for images in emails, as I’m also having users for which the images are not shown (by default). To improve the UX I’d like to suggest the following:

Feature request: Add image url to alt-Text. Rationale: If loading of external content is not allowed (probably default for many mail clients by now), (at least in thunderbird) only the alt-Text is shown. Thus the user sees only image0. If it would be, e.g. image0: https://example.com/uploads/default/original/1X/hash.jpeg the user could click on the link/copy the link and open the url with the picture in their web browser.

Feature request: Include fqdn in markdown (or replace markdown by image url) Rationale: The plain text part of the email will show ![image0|640x480](upload://hash.jpeg), which needs know-how of the domain of the server running discourse/hosting the uploads and manual work to put the link together. Showing ![image0|640x480](https://example.com/uploads/default/original/1X/hash.jpeg) or image0: https://example.com/uploads/default/original/1X/hash.jpeg) would enable the reader of the text/plain contents to directly click/copy the link to open it directly in a web browser.

Thanks for your work and considering the two feature requests!