Created
April 28, 2015 07:21
-
-
Save puneetpandey/26035213128e5bc535dc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'rubygems' | |
require 'viewpoint' # Library for MS Outlook | |
require 'viewpoint/logging/config' # For Debugging | |
include Viewpoint::EWS | |
endpoint = 'YOUR MS EXACHANGE URL COMES HERE' # E.g. https://OUTLOOKSERVER_URL/ews/exchange.asmx | |
user = 'USERNAME' | |
pass = 'PASSWORD' | |
cli = Viewpoint::EWSClient.new endpoint, user, pass | |
folders = cli.folders | |
p folders[0].inspect | |
inbox = cli.get_folder_by_name 'Inbox' | |
items = inbox.items | |
p items[0].body.inspect | |
p items.count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment