Convert Email to Other Formats using Cloud API in Ruby


/ Published in: Ruby
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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')

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.