[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2021-01-12 Thread robin
robin added the comment: Duplicate of https://bugs.python.org/issue11021 but this one is more current and has a patch. -- nosy: +eriker ___ Python tracker ___ ___

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-24 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 24, 2016, at 05:06 PM, R. David Murray wrote: >Barry, would you care to render an opinion on this proposed fix? I think the general approach is probably the best you can do. I noticed a couple of things though with RDM's v.2 patch. First, I get test f

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-24 Thread R. David Murray
R. David Murray added the comment: Barry, would you care to render an opinion on this proposed fix? -- stage: patch review -> commit review ___ Python tracker ___ ___

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-13 Thread R. David Murray
R. David Murray added the comment: Here's patch that only puts the MIME-Version in the output stream and doesn't modify the message (permanently, at least). I like this better. This patch is against 3.5 (the previous one was against 3.6). Since this stuff is provisional in 3.5, I'm thinking

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-11 Thread R. David Murray
R. David Murray added the comment: Hmm. Only doing it in the output is an interesting idea. It's a bit ugly to implement, but doable. -- ___ Python tracker ___ ___

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-11 Thread Kai Groner
Kai Groner added the comment: I agree that there isn't a way to know if a header should be added implicitly, until Generator is called. A possible change to the Generator behavior is to generate the header in the serialized output, without modifying the original. I don't know that it makes d

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-11 Thread Kai Groner
Kai Groner added the comment: >From https://tools.ietf.org/html/rfc2045#section-4 > Note that the MIME-Version header field is required at the top level > of a message. It is not required for each body part of a multipart > entity. It is required for the embedded headers of a body of type

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-09 Thread R. David Murray
Changes by R. David Murray : Added file: http://bugs.python.org/file44520/fix_mime_version_headers.patch ___ Python tracker ___ ___ Python-bug

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-09 Thread R. David Murray
R. David Murray added the comment: Attached is my proposal (absent the doc changes). I'm not happy with it, though, because it means that you don't have the MIME-Version header until you do bytes(msg) (or otherwise generate it), *and* you get a MIME-Version header if you do str(part) for a su

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-09 Thread R. David Murray
R. David Murray added the comment: It turns out that solving this header problem via MIMEPart isn't really a good idea, given the rest of the API. I don't want to not use 'type', or rather I do want to use the new policy.message_factory, and I don't really want to have to have two message_fac

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2015-09-25 Thread Kai Groner
Changes by Kai Groner : Added file: http://bugs.python.org/file40578/test_MIME_Version.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2015-09-25 Thread Kai Groner
Kai Groner added the comment: Relatedly EmailMessage.make_mixed(), etc don't set MIME-Version on the multipart (it is only set on the part). Additional tests attached. -- Added file: http://bugs.python.org/file40577/test_add_attachment_does_not_add_MIME_Version_in_attachment.patch __

[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2015-09-25 Thread Kai Groner
New submission from Kai Groner: Because MIMEPart.add_attachment() creates parts using type(self), EmailMessage.add_attachment() creates parts of type EmailMessage. This results in a MIME-Version header being added to parts where it isn't needed. https://tools.ietf.org/html/rfc2045#section-4