linkedin / pyexchange

Python wrapper for Microsoft Exchange
Apache License 2.0
153 stars 98 forks source link

Messages support and Python 3 #33

Closed nicklasb closed 9 years ago

nicklasb commented 9 years ago

Hi, Interesting project!

I am wondering if there are any plans to add support for monitoring mail boxes and retrieving messages. If not, would you think that including that into pyexchange would be a significant effort, and how would you want it to be included architecturally, as it is about long polling and so forth?

More specifically, I am considering implementing Streaming Notifications for monitoring. http://msdn.microsoft.com/en-us/library/office/hh312849%28v=exchg.140%29.aspx

catermelon commented 9 years ago

Thanks! I'm not adding much in the way of new features, since the project I created it for has what it needs. But several people have added new features and I'm very happy to get more.

I think this would be a fair amount of work, but not too bad, and you could look at how Exchange2010CalendarEvent is used and copy a lot of behavior from that.

PyExchange doesn't use a SOAP library (they were all slow or broken), so we're basically just sending and receiving XML, and there's code that parses the XML into a Python object for easy handling by the end-user. So the first step is figuring out what XML you'll need to send and what you'll get back.

MS has pretty great doc on this. Check out these articles on the XML you need to use to add a new subscription:

http://msdn.microsoft.com/en-us/library/aa566188(v=exchg.140).aspx

And this talks about how you get notifications:

http://msdn.microsoft.com/en-us/library/ff406172(v=exchg.140).aspx

Here's a gist you can use to easily test to see if you're sending the right stuff:

https://gist.github.com/trustrachel/b70d79ea670f048ed165

If you get a working proof of concept, I'm happy to help you hook that into the Python classes. If you get stuck, let me know.

nicklasb commented 9 years ago

Ok, thanks for all the links, I will do that in a month or two. As I mentioned in the other thread, I need to set up a testing environment first, its all Linux here right now.

catermelon commented 9 years ago

Cool, I'll close this, but feel free to reopen.