Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- smtpObj = smtplib.SMTP('smtp.gmail.com', 587)
- type(smtpObj)
- smtpObj.ehlo()
- smtpObj.starttls()
- print("Enter your username")
- myUsername = input()
- print("Enter your password")
- myPassword = input()
- smtpObj.login(myUsername,myPassword)
- print("Type in the email of whomever you wish to email")
- friendEmail = input()
- print("Enter the subject")
- subject = input()
- print("Enter the body")
- body = input()
- smtpObj.sendmail(myUsername,friendEmail,'Subject: ' + subject + '\n' + body )
Add Comment
Please, Sign In to add comment