0

I am making a simple project using smtlib library in python by which i can send birthday wishes via gmail and this is my code I have tried disabling firewall and antivirus but still its not working

import smtplib


my_email = "test@gmail.com"
password = "1234"
connection = smtplib.SMTP("smtp.gmail.com")
connection.starttls()  # secure

connection.login(user=my_email, password=password)
connection.sendmail(from_addr=my_email,
                    to_addrs="test@gmail.com", msg="Hello")
connection.close()

This is the picture of the code and the error

  • Maybe there is a link to the update 2021 part of this answer: https://stackoverflow.com/a/707892/11832127. – ndclt Oct 20 '21 at 12:53

0 Answers0