Cannot get folder
Herz3h opened this issue · comments
Ahmed commented
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
Ahmed commented
Never mind again... was just a mispelling in my username lol