Hi,
I am executing the following code and getting the error : no suitable authentication method found.
import smtplib
sender = "from@gmail.com"
receivers = "to@gmail.com"
message = """ This is a test e-mail message.
This is a test e-mail message. """
try:
smtpServer = smtplib.SMTP('smtp.gmail.com:587')
smtpServer.starttls()
smtpServer.login("user", "password")
smtpServer.sendmail(sender, receivers, message)
print "Successfully sent email"
smtpServer.quit()
except Exception, e:
print "Error: unable to send email: " + str(e)
What am I missing?