Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

send email with python

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.")
Source by al-taie.github.io #
 
PREVIOUS NEXT
Tagged: #send #email #python
ADD COMMENT
Topic
Name
5+6 =