python-simplemail icon indicating copy to clipboard operation
python-simplemail copied to clipboard

Typo in __init__.py

Open vludw opened this issue 4 years ago • 0 comments

Hi,

thanks for creating and providing this nice Python module. When using it, I encountered one error:

  File "PATH_TO_MY_CONDA_ENVIRONMENT/lib/python3.7/site-packages/simplemail/__init__.py", line 360, in send
    email.Encoders.encode_base64(att)
AttributeError: module 'email' has no attribute 'Encoders'

with the corresponding line in __init__.py being

email.Encoders.encode_base64(att)

In the version provided here, this would correspond to line 370 in __init__.py. I fixed it by replacing Encoders by encoders, which I think corresponds to the conversion from Python 2 to Python 3 syntax. I wondered if this also occurs to others and, if yes, might be worth fixing.

Thanks for considering Valentin

vludw avatar Apr 27 '21 07:04 vludw