Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- username = raw_input('Whats your email address?\n')
- password = raw_input('Whats your password?\n')
- toaddrs = raw_input('Send to...\n')
- msg = raw_input('Type your message:\n')
- # The actual mail send
- if "gmail" in username:
- server = smtplib.SMTP('smtp.gmail.com')
- elif "hotmail" or "msn"in username:
- server = smtplib.SMTP('smtp.live.com:587')
- elif "yahoo" in username:
- server = smtplib.SMTP('smtp.mail.yahoo.com:25')
- else:
- print "I'm sorry, Your email provider isn't currently supported."
- server.starttls()
- server.login(username,password)
- server.sendmail(username, toaddrs, msg)
- print 'Done!'
- raw_input("Press enter to continue.")
- server.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement