Guest User

Untitled

a guest
Jan 25th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import smtplib
  2. smtpObj = smtplib.SMTP('smtp.gmail.com', 587)
  3. type(smtpObj)
  4. smtpObj.ehlo()
  5. smtpObj.starttls()
  6. print("Enter your username")
  7. myUsername = input()
  8. print("Enter your password")
  9. myPassword = input()
  10. smtpObj.login(myUsername,myPassword)
  11. print("Type in the email of whomever you wish to email")
  12. friendEmail = input()
  13. print("Enter the subject")
  14. subject = input()
  15. print("Enter the body")
  16. body = input()
  17. smtpObj.sendmail(myUsername,friendEmail,'Subject: ' + subject + '\n' + body )
Add Comment
Please, Sign In to add comment