import smtplib
my_email = "youremail@gmail.com"
password = "password"
with smtplib.SMTP("smtp.gmail.com", port=587) as connection:
# Transport Layer Security (TLS) secures our sensitive information and data from hackers.
connection.starttls()
connection.login(user=my_email, password=password)
connection.sendmail(from_addr=my_email, to_addrs="anotheremail@yahoo.com",
msg="Subject:Hello
This is the body of my email.")