Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __author__ = 'Noah'
- import smtplib
- import datetime
- date = datetime
- fromaddr = "holidaysandspecialdates@gmail.com"
- toaddrs = 'noah.s.cha@gmail.com'
- msg = input("Enter your message:")
- # Credentials (if needed)
- username = 'holidaysandspecialdates@gmail.com'
- password = 'Volcom21904'
- #date = 2015-5-24
- #when datetime.date.today() == date:
- # fromaddr = "holidaysandspecialdates@gmail.com"
- # toaddrs = 'noah.s.cha@gmail.com'
- # msg = "CodeDay Ends Today!!!"
- # The actual mail send
- server = smtplib.SMTP('smtp.gmail.com:587')
- server.starttls()
- server.login(username,password)
- server.sendmail(fromaddr, toaddrs, msg)
- server.quit()
- print("Your message:" + "'" + msg + "'" + " has been sent to " + toaddrs + "." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement