Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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