Answers for "template smtp emails"

7

smtp email template

with smtplib.SMTP('smtp.gmail.com', 587) as connection:
    connection.starttls()  # tls = transport layer security (securing our connection)
    connection.login(user=my_email, password=password)
    connection.sendmail(
        from_addr=my_email,
        to_addrs=reciever_mail,
        msg=f"Subject:Your subject goes herennyour message goes here and nthis will be on new line"
    )
Posted by: Guest on March-05-2021

Python Answers by Framework

Browse Popular Code Answers by Language