You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
'
The text was updated successfully, but these errors were encountered:
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:in
check_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: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: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:in
get_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:in
get_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: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:in
resolve_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
The text was updated successfully, but these errors were encountered: