Content-Transfer-Encoding: 7bit

Hi,
I noticed K-9 adds the meta
Content-Transfer-Encoding: 7bit
to each of the mails that’s sent.
Independently of if the text in the mail is Unicode UTF-8 or just latin characters.
Some mail programs will actually try to follow the “7bit” suggestion with poor results and display jibberish
"
Ευχαριστω πολυ
"
Other mail programs like Thunderbird or Outlook do not have any Encoding tag in the header at all when a mail is sent.
Why does K-9 add that? What purpose does it serve?

/Stefanos

Interesting. Mine uses:
Content-Transfer-Encoding: quoted-printable
And that seems to be OK. Maybe it depends on some settings?

K-9 Mail never uses Content-Transfer-Encoding: 7bit for text parts of the message. Can you post the full message source?

Thanks for the very good feedback and helping me get to the bottom of this. So it is not K-9 that adds the “7bit” part. Is it then the outgoing mail service (in this case Zoho mail) that injects it? Look at the below. This is a test-mail I have sent to myself. So I can see it both in my “Sent” and “Inbox”. The following is the source of the mail that sits in my “Sent” folder, I can see two different “Content-Transfer-Encoding” tags:


Date: Fri, 10 Jun 2022 19:56:17 +0200
From: -removed by me for privacy-
To: -removed by me for privacy-
Subject: Test_mail
User-Agent: K-9 Mail for Android
Message-ID: -removed by me for privacy-
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary=----GLCKPJUAF77BX2BCOTGYFFT1D4BMP8
Content-Transfer-Encoding: 7bit
X-ZohoMail-Sender: -removed by me for privacy-
X-ZM-MESSAGEID: -removed by me for privacy-

------GLCKPJUAF77BX2BCOTGYFFT1D4BMP8
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable

test text
–=20
Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E
------GLCKPJUAF77BX2BCOTGYFFT1D4BMP8
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable

test text
<d=

iv class=3D’k9mail-signature’>--
Sent from my Android device with K-9 M=
ail=2E Please excuse my brevity=2E


------GLCKPJUAF77BX2BCOTGYFFT1D4BMP8–


I thought I would first post this source (from the “Sent” folder) as I consider it to be a level closer to what is sent. And I can see the “7bit” even from this level. I can also see a “boundary” tag.
Question: What does this “code” do? Does it tell the engine to consider 7-bit encoding for some specific parts of the mail within the lines that are “in the defined boundary”? Or what is it supposed to do?

For information,
I have the source of the “same” message, but the one that arrived in my Inbox if anyone wants to see that. I can’t see anything exciting… It is a whole extra page of source added on the top of the sent mail containing the following extra tags


(removed the content of the tags for shortness of content - in an already very long post :grin: )
Delivered-To:
Authentication-Results:
ARC-Seal:
ARC-Message-Signature:
ARC-Authentication-Results:
Return-Path:
Received:
Received:
Received:
Received:
Received:
Received:
Received:
Received:
Received:
Received:
Received:
X-Sieve-Action:
X-Cyrus-Session-Id:
X-Sieve:
X-Spam-known-sender:
X-Spam-sender-reputation:
X-Spam-score:
X-Spam-hits:
X-Spam-source:
X-Spam-charsets:
X-Resolved-to:
X-Delivered-to:
X-Mail-from:
ARC-Seal:
ARC-Message-Signature:
ARC-Authentication-Results:
X-ME-Authentication-Results:
Authentication-Results:
Authentication-Results:
Authentication-Results:
X-ME-VSCause:
X-ME-VSScore:
X-ME-VSCategory:
X-ME-CSA:
Received-SPF:
Received-SPF:
DKIM-Signature:
DKIM-Signature:
X-ME-Sender:
X-ME-Received:
X-ME-Proxy-Cause:
X-ME-Proxy:
Feedback-ID:


followed directly by what we saw before:


Date: Fri, 10 Jun 2022 19:56:17 +0200
From:
To:
Subject: Test_mail
User-Agent: K-9 Mail for Android
Message-ID:
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary=----GLCKPJUAF77BX2BCOTGYFFT1D4BMP8
Content-Transfer-Encoding: 7bit
X-ZohoMail-DKIM:
X-ZM-MESSAGEID:

------GLCKPJUAF77BX2BCOTGYFFT1D4BMP8
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable

test text
–=20
Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E
------GLCKPJUAF77BX2BCOTGYFFT1D4BMP8
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable

test text
<d=

iv class=3D’k9mail-signature’>--
Sent from my Android device with K-9 M=
ail=2E Please excuse my brevity=2E


------GLCKPJUAF77BX2BCOTGYFFT1D4BMP8–


So question number 2:
Is the suggestion to look around if there is such a setting in my mail provider’s page of my account? I understand this “7bit” is nothing that K-9 added, correct?

The message contains three message parts:

  • multipart/alternative
    • text/plain
    • text/html

The multipart/alternative part is a container that contains the message parts with the actual message text (two alternatives: “plain” text and HTML). The Content-Transfer-Encoding: 7bit header only applies to this multipart/alternative part. The text parts have their own Content-Transfer-Encoding headers.

The Content-Transfer-Encoding: 7bit header isn’t really necessary. But it isn’t wrong. And it shouldn’t cause an email client to wrongly decode any of the text parts. So whatever is causing the contents of your message to be improperly decoded, it’s very unlikely to be that header field.

Yup, I get it. Thanks for the quick reply and the clarification.

I will have a closer look at the mails that were decoded by the recipient client as

Ευχαριστω πολυ

to see if anything else sticks out or if anything was special about them. Thanks for your help so far.