I'm try to send an email with SMTP_SSL (the mail server does not support smtp).
import smtp
s = smtp.SMTP_SSL('xxxxx')
I get an error:
module object has no attribute 'SMTP_SSL'
I don't quite understand why python smptlib has no attribute SMTP_SSL given that the python documentation shows that SMTP_SSL has this attribute.
Either your script's name is email.py or you have another script in your directory named email.py. You should change the name of the script.
When python is compiled without ssl support, you get an smtp module without the expected attribute: SMTP_SSL.
This happens sometimes when openssl is not automatically detected, maybe some dependency isn't installed on the system when python was built.
Here is a tutorial on how to overcome that: https://techglimpse.com/install-python-openssl-support-tutorial/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With