kendime basit bir sendmail işlevini yazıyorum ve bu hatayı almaya devam: Yeni Python için, GMail SMTP hatası
NameError
: adı 'SMTPException' benim koduyla yanlış nedirtanımlanmamıştır? Baska öneri?
import smtplib
sender = "[email protected]"
receiver = ["[email protected]"]
message = "Hello!"
try:
session = smptlib.SMTP('smtp.gmail.com',587)
session.ehlo()
session.starttls()
session.ehlo()
session.login(sender,'password')
session.sendmail(sender,receiver,message)
session.quit()
except SMTPException:
print('Error')
Ah Yazım hatası yaşadım. – eatonphil
Endişelenmeyin bile, SMTP ile 20 yıl çalıştıktan sonra bile bunu yapıyorum. –