Advertisement
Guest User

Untitled

a guest
Jun 24th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. __author__ = 'Noah'
  2.  
  3. import smtplib
  4.  
  5.  
  6. import datetime
  7.  
  8. date = datetime
  9.  
  10. fromaddr = "holidaysandspecialdates@gmail.com"
  11. toaddrs = 'noah.s.cha@gmail.com'
  12. msg = input("Enter your message:")
  13.  
  14.  
  15. # Credentials (if needed)
  16. username = 'holidaysandspecialdates@gmail.com'
  17. password = 'Volcom21904'
  18.  
  19. #date = 2015-5-24
  20.  
  21. #when datetime.date.today() == date:
  22. # fromaddr = "holidaysandspecialdates@gmail.com"
  23. # toaddrs = 'noah.s.cha@gmail.com'
  24. # msg = "CodeDay Ends Today!!!"
  25. # The actual mail send
  26. server = smtplib.SMTP('smtp.gmail.com:587')
  27. server.starttls()
  28. server.login(username,password)
  29. server.sendmail(fromaddr, toaddrs, msg)
  30. server.quit()
  31. print("Your message:" + "'" + msg + "'" + " has been sent to " + toaddrs + "." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement