-
Notifications
You must be signed in to change notification settings - Fork 40
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
Python3 sending emails with attachments doesn't work #24
Comments
Python 2.x email.generator expects basestring (means str or unicode), so it can decode with 'ascii' even if in Python 2.x.
if not isinstance(payload, basestring):
raise TypeError('string payload expected: %s' % type(payload)) |
I can confirm this bug. I also confirm the fix by t2y is correct. Please, merge it as soon as possible and release a 0.10.1 version. I had to remove Python 3 support for my application because of this :-( Let me know if there is something I can do to help here. |
I also hope to be merged and I can help. |
I have pushed the change, but don't have the rights on PyPI to release the package. mmerickel, can you release? |
Trying to send an email having an attachment results in following error:
I think the problem is in the
encode_string
method inresponse.py
file. The method returns bytes object in Python3 but the string is expected.To fix this, just replace
with
The same fix needs to be done with quopri.encodestring
These changes applies only to python3 version.
The text was updated successfully, but these errors were encountered: