-
Notifications
You must be signed in to change notification settings - Fork 171
Home
zenchild edited this page Nov 19, 2010
·
7 revisions
Viewpoint is a client library for Microsoft Exchange Web Services. Stay tuned to this wiki for example usage and other documentation.
If you are using Viewpoint for a project drop me a line on Github and let me know what you’re using it for and how it’s working for you. I’d love to list your name or company here.
Ruby 1.9 users: make sure and require 'kconv'
. This is a requirement of rubyntlm.
Get a Folder object that represents your Inbox.
Viewpoint::EWS::EWS.endpoint = 'http://myemail.com/ews/exchange.asmx'
Viewpoint::EWS::EWS.set_auth 'username','password'
inbox = Viewpoint::EWS::Folder.get_folder_by_name('Inbox')
Get attachments from an Item object. The Item#attachments method will return an array of a subclass of Attachment.
items = inbox.find_items
attmts = items[3].attachments
# This will save the file to the current directory with the default filename
# You can specify a path + name if you want to change this behavior. #save_to_file(dir_path, file_name)
attmts.first.save_to_file