Closed fork- closed 9 years ago
gmail rejects my binary attachments if they aren't base64 encoded. +1 for this
Gist form link worked for me
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.
Corrected in development and version bumped. Running some tests on my work codebases before release.
Committed code resolves issue.
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