public inbox for pgsql-www@postgresql.org  
help / color / mirror / Atom feed
From: Magnus Hagander <magnus@hagander.net>
To: Tobias Bussmann <t.bussmann@gmx.net>
Cc: pgsql-www@lists.postgresql.org
Subject: Re: Images in news mails
Date: Wed, 7 Jan 2026 21:46:18 +0100
Message-ID: <CABUevExfO2oP=h==31c1XM=OsiCc4tbSGZorJ-V3EwAbNaAJBQ@mail.gmail.com> (raw)
In-Reply-To: <99A6E7C8-1634-4162-96FD-D5AC404ADBCF@gmx.net>
References: <99A6E7C8-1634-4162-96FD-D5AC404ADBCF@gmx.net>

On Thu, 4 Sept 2025 at 21:49, Tobias Bussmann <t.bussmann@gmx.net> wrote:

> Ever since HTML emails were introduced for project news in around 2020, I
> have wondered why, on my system (macOS using Apple Mail as the MUA), emails
> were sometimes displayed in a distorted way. Today, I took the time to
> track it down. Apple Mail ignores the size if the image source is provided
> inline via CID and not referenced externally [2, footnote 3]. As a
> workaround, the width can be specified again in the 'style' tag, as I have
> done in the attached patch.
>
> Another issue is that the Slonik logo is displayed again at the end of the
> email. In contrast to the first issue, this affects the Mail app on iOS as
> well. My analysis suggests that this is caused by the MIME structure of the
> email:
> - multipart/mixed
>   - multipart/alternative
>     - text/plain
>     - text/html
>   - image/png with Content-Disposition: inline
>
> This issue is resolved if I change the structure to the following:
> - multipart/alternative
>   - text/plain
>   - multipart/related
>     - text/html
>     - image/png with Content-Disposition: inline
>
>
Wow, this was a lot of fun. Not.

I have changed the code to restructure like this and it mostly works. It
now breaks in the gmail app on android when connected to our company
emulated-exchange interface. But it fixes apple mail. I think there are a
lot more apple mail out there, so I think it's a strict improvement :)

Thanks for the diagnosing work! I hope this does properly fix it!

//Magnus


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-www@postgresql.org
  Cc: magnus@hagander.net, t.bussmann@gmx.net, pgsql-www@lists.postgresql.org
  Subject: Re: Images in news mails
  In-Reply-To: <CABUevExfO2oP=h==31c1XM=OsiCc4tbSGZorJ-V3EwAbNaAJBQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox