Skip to content

Attachments should be encoded with base64 #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fork- opened this issue Jan 4, 2012 · 5 comments
Closed

Attachments should be encoded with base64 #37

fork- opened this issue Jan 4, 2012 · 5 comments
Labels
1.bug An error has been encountered that is preventing utilization. area:message Issue relates to the MIME e-mail Message object representation.

Comments

@fork-
Copy link

fork- commented Jan 4, 2012

Seems like agronholm looked at some emails I sent him with PDF attachments.

He said that attachments should be encoded with base64

So it seems as if this is the case and I was able to resolve it see here.

https://gist.github.com/dfee96dbd57bdeb3498f

@zz85
Copy link

zz85 commented Oct 31, 2012

gmail rejects my binary attachments if they aren't base64 encoded. +1 for this

@serhiip
Copy link

serhiip commented Sep 30, 2013

Gist form link worked for me

@disko
Copy link

disko commented Jun 11, 2014

The proposal from the gist solves most of the problems I have with attachments, too. However, in Apple's Mail.app on OS X the attachments are still corrupt. This can be solved by adding a line break every 76 chars to base64 encoded string. Sth. like this did the job for me::

payload = '\n'.join(attachment[pos:pos+76] for pos in xrange(0, len(attachment), 76))

This is apparently also required by RFC1521.

amcgregor added a commit that referenced this issue Jul 23, 2014
Work on #37.  Bundles additional feature to re-name on-disk attachments.
@amcgregor
Copy link
Member

Corrected in development and version bumped. Running some tests on my work codebases before release.

@amcgregor
Copy link
Member

Committed code resolves issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.bug An error has been encountered that is preventing utilization. area:message Issue relates to the MIME e-mail Message object representation.
Projects
None yet
Development

No branches or pull requests

5 participants