Python already has an email module. Your script’s name is email.py, which is preventing smtplib from importing the built-in email module.
Rename your script to something other than email.py and the problem will go away.
Python already has an email module. Your script’s name is email.py, which is preventing smtplib from importing the built-in email module.
Rename your script to something other than email.py and the problem will go away.