forked from rapid7/komand-python-o365
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Something is wrong with sending messages. I'm trying to sort it out
but it is being a really pain in the neck.
- Loading branch information
Toben Archer
committed
May 7, 2015
1 parent
c4f68f3
commit 5760863
Showing
4 changed files
with
105 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from O365 import * | ||
import getpass | ||
import json | ||
|
||
uname = raw_input('Enter your user name: ') | ||
|
||
password = getpass.getpass('Enter your password: ') | ||
|
||
auth = (uname,password) | ||
|
||
rec = raw_input('Reciving address: ') | ||
|
||
subject = raw_input('Subject line: ') | ||
|
||
line = 'flarg!' | ||
body = '' | ||
print 'Now enter the body of the message. leave a blank line when you are done.' | ||
while line != '': | ||
line = raw_input() | ||
body += line | ||
|
||
|
||
m = Message(None,auth) | ||
m.setRecipients(rec) | ||
m.setSubject(subject) | ||
m.setBody(body) | ||
|
||
print 'Sending message...' | ||
print json.dumps(m.json) | ||
print m.sendMessage() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
] | ||
|
||
setup(name='O365', | ||
version='0.6', | ||
version='0.6.1', | ||
description='Python library for working with Microsoft Office 365', | ||
author='Toben Archer', | ||
author_email='[email protected]', | ||
|