import smtplib
s = smtplib.SMTP('smtp.gmail.com', 587)
s.starttls()
s.login("sender_email_id", "sender_email_id_password")
message = "Message_you_need_to_send"
s.sendmail("sender_email_id", "receiver_email_id", message)
s.quit()
nice
import smtplib
creates SMTP session
s = smtplib.SMTP('smtp.gmail.com', 587)
start TLS for security
s.starttls()
Authentication
s.login("sender_email_id", "sender_email_id_password")
message to be sent
message = "Message_you_need_to_send"
sending the mail
s.sendmail("sender_email_id", "receiver_email_id", message)
terminating the session
s.quit()
by Chukscplus, 1 years agonice
by Datboi_Armin, 1 years agoPlease log in to post a comment.