Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Sending email from python


            
                
            
 run  | edit  | history  | help 0

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, 4 months ago


nice

  by  Datboi_Armin, 3 months ago




Please log in to post a comment.
V
RNG
gj1