Ruby library for accessing Microsoft Exchange using Exchange Web Services. This library tries to make creating and updating items as easy as possible. It will keep track of changed properties and will update only them.
- FindItem, GetItem, CreateItem, UpdateItem, DeleteItem
- FindFolder, GetFolder
- ResolveNames, ExpandDL
gem install exchanger
Exchanger.configure do |config| config.endpoint = "https://domain.com/EWS/Exchanger.asmx" config.username = "username" config.password = "password" end
or configure from YAML
folder = Exchanger::Folder.find(:contacts) contact = folder.new_contact contact.given_name = "Edgars" contact.surname = "Beigarts" contact.email_addresses = [ Exchanger::EmailAddress.new(:key => "EmailAddress1", :text => "firstname.lastname@example.org") ] contact.phone_numbers = [ Exchanger::PhoneNumber.new(:key => "MobilePhone", :text => "+371 80000000") ] contact.save # CreateItem operation contact.company_name = "Example Inc." contact.save # UpdateItem operation contact.destroy # DeleteItem operation
mailboxes = Exchanger::Mailbox.search("John")
The easiest way is to sign up for a Microsoft Office 365 free trial.
- Create a random calendar entry in July 2016
- Create a distribution list named 'Test'
spec/config.ymlwith your Exchange credentials
spec/fixtures/get_user_availability.ymlwith your Exchange email address
- Clear the recorded VCR cassettes by removing
- Run the specs
It looks like Office 365 trial has some rate limits, so you may have to record the VCR cassettes for each spec separately.
Exchanger::Operation::ResponseError: An internal server error occurred. Try again later.