Python3 Smtp Valueerror: Server_hostname Cannot Be An Empty String Or Start With A Leading Dot
import smtplib smtp = smtplib.SMTP() smtp.connect('smtp.gmail.com','587') (220, b'smtp.gmail.com ESMTP h15-v6sm187291iog.48 - gsmtp') smtp.starttls() Traceback (most recent call la
Solution 1:
It seems a python3.7 bug, pass the hostname to smtplib.SMTP will fix it
smtp = smtplib.SMTP('smtp.gmail.com')
smtp.connect('smtp.gmail.com','587')
Post a Comment for "Python3 Smtp Valueerror: Server_hostname Cannot Be An Empty String Or Start With A Leading Dot"