Open praneethpatlola opened 8 years ago
I have not had your exact issue, but I was trying to connect to a similar endpoint. It turns out that my endpoint was incorrect (and returning a 404, even though the basic authentication was still being requested).
In the end, I changed Exchanger.asmx
to Exchange.asmx
I am trying to retrieve particular messages. I am able to get item.subject, item.from.email, item.from.name but never item.body. Its throws 404 error.
Are there any options I need to set while instantiating the client or within get_folder() to get the email body? Or is there a different way to get this.
require 'viewpoint' include Viewpoint::EWS endpoint = "https://outlook.office365.com/EWS/Exchanger.asmx" user = 'xxx' pass = 'xxx' client = Viewpoint::EWSClient.new(endpoint, user, pass) inbox = client.get_folder(:inbox) inbox.items_between(Date.today-(i+5),Date.today-i).last.body
Viewpoint::EWS::Errors::ResponseError: HTTP Error Code: 404, Msg: from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/connection.rb:112:incheck_response' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/connection.rb:89:in
post' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/connection.rb:67:indispatch' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/soap/exchange_web_service.rb:212:in
do_soap_request' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/soap/exchange_data_services.rb:87:inget_item' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types/item.rb:313:in
get_item' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types/item.rb:117:inget_all_properties!' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types.rb:63:in
deepen!' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types.rb:135:inrescue in resolve_method' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types.rb:128:in
resolve_method' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types.rb:26:inmethod_missing' from (irb):234 from /Users/ppatlola/.rvm/rubies/ruby-1.9.3-p551/bin/irb:12:in