From: Catalin Marinas Date: Wed, 08 Nov 2006 09:41:33 GMT Subject: Re: [PATCH] Add a MIME-Version header to e-mails Message-ID: In-Reply-To: <20061108084038.GA3164@diana.vm.bytemark.co.uk> On 08/11/06, Karl Hasselström wrote: > On 2006-11-07 19:09:06 +0000, Catalin Marinas wrote: > > > I re-implemented parts of the mail and import commands (inspiring > > from your patches). They now use the email Python package. The mail > > command encodes the body to 7 or 8bit depending on non-ascii > > characters. > > Even though it turned out to be possible to use 8bit always? I just let the Python email package to the encoding and it first tries pure ascii and switches to 8bit if this fails. This package automatically adds the proper e-mail headers based on the encoding type. It can also do QP or base64 encodings (if someone complains of an old SMTP server, maybe I'll add a config option to force QP body). > > I still have to write a test script but my simple tests showed that > > it works. Please let me know if there is anything wrong (especially > > with the QP-encoding of the mail headers). > > I won't have time to check this out today (in fact, it may have to > wait until the weekend). But when I do check it out, I might have time > to write that test, so please holler if you start working on that. It would be great if you can run a test script. I've been thinking more of an "import" test that also checks both the "export" and "mail" commands. BTW, I'll try to add support for mbox importing which is pretty easy with the email package. --