mail icon indicating copy to clipboard operation
mail copied to clipboard

fix: inconsistent encoding in saved sent messages

Open st3iny opened this issue 1 year ago • 2 comments

Upstream fix at https://github.com/bytestream/Mime/pull/7 or https://github.com/bytestream/Mime/pull/8 (both were tested locally)

TL;DR: Sent email bodies are saved as 7bit quoted-printable but the headers say 8bit.

I switched to the streamed implementation of getRaw() for now. The streamed implementation is also broken but a bit less broken as it defaults to 8bit. I did some bisecting and we used stream=true before https://github.com/nextcloud/mail/pull/9364 but now we use stream=false because the string is cached in the db (outbox table).

How to reproduce?

  1. Send some mail with complex UTF-8 chars, e.g. ‘ or nbsp.
  2. Wait for it be sent.
  3. Have a look at the sent mail in your sent mailbox.
  4. Observe weird chars because the mail has inconsistent encoding (headers vs. body).

Screenshots

Before After
grafik grafik

st3iny avatar May 30 '24 14:05 st3iny

/backport to stable3.7

st3iny avatar May 30 '24 14:05 st3iny

/backport to stable3.6

st3iny avatar May 30 '24 14:05 st3iny