Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smtplib
- HOST = 'mail.example.com'
- USER = 'me@example.com'
- PASS = '1234'
- TO = 'friend@example.com'
- server = smtplib.SMTP(HOST, port=25)
- server.set_debuglevel(1)
- server.login(USER, PASS)
- message = "Yolo!"
- try:
- server.sendmail(USER, TO, message)
- except:
- print "Error occured"
- server.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement