Subject: [PATCH] Add a MIME-Version header to e-mails

From: Karl Hasselström <[email-masked]>
Date: Mon, 06 Nov 2006 08:45:32 +0100

From: Karl Hasselström <[email-masked]>

This is required by some mail servers that want to change the transfer
encoding of the mail.

Signed-off-by: Karl Hasselström <[email-masked]>
---

OK, this is a test to see if adding MIME-Version makes the problem go
away. I don't have any other way to test this than sending a patch to
the list. :-)

 stgit/commands/mail.py |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index 45f7438..c428d67 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -271,13 +271,11 @@ def __get_signers_list(msg):
     return addr_list
 
 def __build_extra_headers():
-    """Build extra headers like content-type etc.
-    """
-    headers  = 'Content-Type: text/plain; charset=utf-8; format=fixed\n'
-    headers += 'Content-Transfer-Encoding: 8bit\n'
-    headers += 'User-Agent: StGIT/%s\n' % version.version
-
-    return headers
+    """Build extra headers like content-type etc."""
+    return ('MIME-Version: 1.0\n'
+            'Content-Type: text/plain; charset=utf-8; format=fixed\n'
+            'Content-Transfer-Encoding: 8bit\n'
+            'User-Agent: StGIT/%s\n' % version.version)
 
 def edit_message(msg):