Nils Bunger writes:
> Hi Neil,
>
> Thanks for looking at this.
>
> I'm trying to create a multipart MIME for an HTTP POST request, not an
> email. This is for a third-party API that requires a multipart POST
> with a binary file, so I don't have the option to just use a different
> encoding.
>
Hi all,
I was able to workaround this problem by encoding a unique 'marker' in the
binary part, then replacing the marker with the actual binary content after
generating the MIME message.
See my answer on Stack Overflow http://stackoverflow.com/a/19033750/526098 for
the code.
Thanks, your s
Hi Neil,
Thanks for looking at this.
I'm trying to create a multipart MIME for an HTTP POST request, not an email.
This is for a third-party API that requires a multipart POST with a binary
file, so I don't have the option to just use a different encoding.
Multipart HTTP is standardized in
On 2013-09-26, Chris Angelico wrote:
> On Thu, Sep 26, 2013 at 2:23 PM, Nils Bunger wrote:
>> Yes, it's email.mime.MIMEApplication. I've pasted a snippet
>> with the imports below.
>>
>> I'm trying to use this to build a multi-part MIME message,
>> with this as one part.
>>
>> I really can't figu
On Thu, Sep 26, 2013 at 2:23 PM, Nils Bunger wrote:
> Yes, it's email.mime.MIMEApplication. I've pasted a snippet with the imports
> below.
>
> I'm trying to use this to build a multi-part MIME message, with this as one
> part.
>
> I really can't figure out any way to attach a binary part like t
Chris,
Thanks for answering.
Yes, it's email.mime.MIMEApplication. I've pasted a snippet with the imports
below.
I'm trying to use this to build a multi-part MIME message, with this as one
part.
I really can't figure out any way to attach a binary part like this to a
multi-part MIME messa
On Thu, Sep 26, 2013 at 2:38 AM, wrote:
> app = MIMEApplication(b'Q\x0dQ', _encoder=encode_noop)
What is MIMEApplication? It's not a builtin, so your test case is
missing an import, at least. Is this email.mime.MIMEApplication?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I'm having trouble encoding a MIME message with a binary file. Newline
characters are being interpreted even though the content is supposed to be
binary. This is using Python 3.3.2
Small test case:
app = MIMEApplication(b'Q\x0dQ', _encoder=encode_noop)
b = io.BytesIO()
g = BytesGenerator