As you can see, smtplib uses another module called 'email' which is a package in the standard library. I think you should rename your program to something else than 'email.py' (also why is your script in a folder called 'dont_use' ? Perhaps you should not use it :).
Gribouillis
Posting Maven
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691
The error message clearly shows that when smtplib runs the code import email.Utils , it imports your own "\\Wc98466\d\baks\dont_use\devel\email.py" instead of the package email of the standard library, which it must do. So the solution is to make sure that there is no file email.py or email.pyc or email packagecreated by you on the python path before you import smtplib.
Gribouillis
Posting Maven
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691
Hi Gribouillis
Many thanks for posting the above explanation.
I had the same problem, and renaming my Python script to myemail.py (and deleting email.py) solved the problem.
AcmeUK
thanks :)
Gribouillis
Posting Maven
2,786 posts since Jul 2008
Reputation Points: 1,044
Solved Threads: 691