Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mys-office-laptop
- import os
- from slackclient import SlackClient
- import smtplib
- gmail_user = 'testing@.com'
- gmail_password = ''
- sent_from = gmail_user
- to = ['may@.com']
- subject = 'OMG Super Important Message'
- try:
- server = smtplib.SMTP('smtp.gmail.com', 587)
- server.ehlo()
- server.starttls()
- server.ehlo()
- server.login(gmail_user, gmail_password)
- server.sendmail(sent_from, to, subject)
- server.quit()
- except Exception, e:
- print 'Something went wrong...', e
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement