Posted By

johansonkatherine on 06/10/14


Tagged

email ruby to with cloud api in convert for messages msg SDK Outlook Aspose EML cloudwork


Versions (?)

Convert Email to Other Formats using Cloud API in Ruby


 / Published in: Ruby
 

URL: http://www.aspose.com/blogs/aspose-products/aspose-for-cloud-apis/archive/2014/05/28/work-with-email-messages-and-attachments-in-ruby-using-aspose-for-cloud.html

This technical tip shows how developers can convert email messages to other formats like EML, MSG & MHT in cloud using ruby language.

  1. require 'path/to/lib/asposecloudsdk'
  2.  
  3. app_sid = '****'
  4. app_key = '****'
  5.  
  6. Aspose::Cloud::Common::AsposeApp.app_key = app_key
  7. Aspose::Cloud::Common::AsposeApp.app_sid = app_sid
  8. Aspose::Cloud::Common::AsposeApp.output_location = ''
  9. Aspose::Cloud::Common::Product.set_base_product_uri('http://api.aspose.com/v1.1')
  10.  
  11. # Create Object of folder class
  12. folder = Aspose::Cloud::AsposeStorage::Folder.new
  13. folder.upload_file 'path/to/storage/email_test.eml'
  14.  
  15. # Create object of converter
  16. con_obj = Aspose::Cloud::Email::Converter.new('path/to/storage/email_test.eml')
  17. con_obj.convert('msg')

Report this snippet  

You need to login to post a comment.