Cannot get folder #21

Closed
Herz3h opened this Issue Jan 3, 2017 · 1 comment

Projects

None yet

1 participant

@Herz3h
Herz3h commented Jan 3, 2017 edited

Hello when i try to execute this code :

I have put this code

require 'exchanger'

Exchanger.configure do |config|
  config.endpoint = "https://domain.com/EWS/Exchanger.asmx"
  config.username = "username"
  config.password = "password"
  config.debug = true # show Exchange request/response info
end

in exchanger.rb in initializers folders and then when i try this code in my controller :

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 => "me@example.com") ]
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

It tells me that folder is nil...I've already configured the endpoint and login/password. I've also tried with the office 365 ews endpoint : https://outlook.office365.com/EWS/Exchange.asmx

@Herz3h
Herz3h commented Jan 3, 2017

Never mind again... was just a mispelling in my username lol

@Herz3h Herz3h closed this Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment