import smtplib
SERVER = "localhost"
FROM = "[email protected]"
TO = ["[email protected]"]
SUBJECT = "Hello!"
TEXT = "This message was sent with Python's smtplib."
server = smtplib.SMTP(SERVER)
server.sendmail(FROM, TO, message)
server.quit()
Cela donne l'erreur:comment envoyer e-mail en python
'**The debugged program raised the exception unhandled AttributeError
"'module' object has no attribute 'SMTP'"
File: /home/an/Desktop/email.py, Line: 13**'
Quelle est la version de Python? – TML
Reformaté un peu. –
Pourriez-vous vous débarrasser du wiki de la communauté? Il h. –