J'utilise le script ci-dessous pour m'envoyer un e-mail, le script fonctionne bien sans erreur mais je ne reçois pas physiquement un email.Python: Email problème
import smtplib
sender = '[email protected]'
receivers = ['[email protected]']
message = """From: From Person <[email protected]>
To: To Person <[email protected]>
Subject: SMTP e-mail test
This is a test e-mail message.
"""
try:
smtpObj = smtplib.SMTP('localhost')
smtpObj.sendmail(sender, receivers, message)
print "Successfully sent email"
except SMTPException:
print "Error: unable to send email"
EDIT
Le script est nommé test.py
Si jamais je physiquement reçu un e-mail, je dois avoir une conversation avec mon psy. –