Guest User

Untitled

a guest
Jan 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. from O365 import Account
  2.  
  3. scopes_graph = protocols.get_scopes_for('message_send')
  4. credential = ('client_id', 'client_secret')
  5.  
  6. account = Account(credentials=credential, scopes=scopes_graph)
  7. account.con.get_authorization_url()
  8. result_url = input('Paste the result url here...')
  9. #'aqui crea el txt pero no genera el
  10. account.con.request_token(result_url)
  11. m = account.new_message()
  12. m.to.add('examples@example.com')
  13. m.subject = 'Testing!'
  14. m.body = "George Best quote: I've stopped drinking, but only while I'm asleep."
  15. m.send()
Add Comment
Please, Sign In to add comment