use pip install yagmail
:
example:
import yagmail
yag = yagmail.SMTP(user="[email protected]",
password="your_email_password")
yag.send("[email protected]", "Subject", "Hello, this is a test
email from Python.")
the code is pretty self explaintory but If you have any questions let me know