Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body missing - HTTP Error Code: 404 #246

Open
praneethpatlola opened this issue Sep 1, 2016 · 1 comment
Open

Body missing - HTTP Error Code: 404 #246

praneethpatlola opened this issue Sep 1, 2016 · 1 comment

Comments

@praneethpatlola
Copy link

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:in check_response' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/connection.rb:89:inpost'
from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/connection.rb:67:in dispatch' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/soap/exchange_web_service.rb:212:indo_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:in get_item' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types/item.rb:313:inget_item'
from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types/item.rb:117:in get_all_properties!' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types.rb:63:indeepen!'
from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types.rb:135:in rescue in resolve_method' from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types.rb:128:inresolve_method'
from /Users/ppatlola/.rvm/gems/ruby-1.9.3-p551/gems/viewpoint-1.0.0/lib/ews/types.rb:26:in method_missing' from (irb):234 from /Users/ppatlola/.rvm/rubies/ruby-1.9.3-p551/bin/irb:12:in

'

@timkrins
Copy link

timkrins commented Nov 11, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants