Free Press Release
Create Free Account! Members Login
Art & Entertainment Automotive Blogging & Social Media Business Computer Design Education Environment Events / Trade Shows Games & Entertainment Government Health and Fitness Home & Family Industry Legal / Law Lifestyle News & Society Politics Religion Sports Technology Web sites / Internet

Press Release / Computer / Ruby Sample Code to Convert Email Messages to EML MSG and MHT and Download Attachments using Cloud Apps

Ruby Sample Code to Convert Email Messages to EML MSG and MHT and Download Attachments using Cloud Apps

By johansonkatherine on June 06 2014 | 483 Views

Aspose has released Aspose Cloud SDK for Ruby. Now you can convert email messages to other formats like EML, MSG & MHT.

Aspose has released Aspose.Email as part of the Aspose Cloud SDK for Ruby. The Aspose Cloud SDK for Ruby has been around for a while and now Aspose has added features to work with email messages. Now you can convert email messages to other formats like EML, MSG & MHT. Also, developers can download attachments from email messages and store them on a local disc or on Aspose storage. It is even possible to modify email message properties like From, To, and Subject. Below are the code samples for Converting Email to Other Formats and Download Attachment from Email.


Converting Email to Other Formats


require ’path/to/lib/asposecloudsdk’

app_sid = ’****’
app_key = ’****’

Aspose::Cloud::Common::AsposeApp.app_key = app_key
Aspose::Cloud::Common::AsposeApp.app_sid = app_sid
Aspose::Cloud::Common::AsposeApp.output_location = ’’
Aspose::Cloud::Common::Product.set_base_product_uri(’http://api.aspose.com/v1.1’)

# Create Object of folder class
folder = Aspose::Cloud::AsposeStorage::Folder.new
folder.upload_file ’path/to/storage/email_test.eml’

# Create object of converter
con_obj = Aspose::Cloud::Email::Converter.new(’path/to/storage/email_test.eml’)
con_obj.convert(’msg’)


Download Attachment from Email


require ’path/to/lib/asposecloudsdk’

app_sid = ’****’
app_key = ’****’

Aspose::Cloud::Common::AsposeApp.app_key = app_key
Aspose::Cloud::Common::AsposeApp.app_sid = app_sid
Aspose::Cloud::Common::AsposeApp.output_location = ’’
Aspose::Cloud::Common::Product.set_base_product_uri(’http://api.aspose.com/v1.1’)

# Create Object of folder class
folder = Aspose::Cloud::AsposeStorage::Folder.new
folder.upload_file ’path/to/storage/email_test.eml’

# Create object of email document
doc_obj = Aspose::Cloud::Email::Document.new(’path/to/storage/email_test.eml’)
result = doc_obj.get_attachment(’attachment.jpg’)


Introduction to Ruby


A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write. Since its public release in 1995, Ruby has drawn devoted coders worldwide. In 2006, Ruby achieved mass acceptance. With active user groups formed in the world’s major cities and Ruby-related conferences filled to capacity. Below are some important code samples for converting email to other formats and download attachment from email.

https://github.com/asposeforcloud/Aspose_Cloud_SDK_For_Ruby/wiki/Working-with-Email-file-formats-using-Aspose.Email


Overview: Aspose for Cloud


Aspose for Cloud is a cloud-based document generation, conversion and automation platform for developers that offer a unique suite of APIs to work with Word documents, Excel spreadsheets, PowerPoint presentations, PDFs, and email formats and protocols. It supports all features for file processing, document scanning, barcodes creation and recognition, and allows extracting text or images too. You can also work with SaaSpose APIs using REST SDKs that can be called from .NET, Java, PHP and Ruby etc.


Aspose.Email for Cloud


Aspose.Email for Cloud is a REST API for creating email archiving applications that work with common email file formats. It lets developers manipulate message formats such as MSG, EML, and MHT files. The API supports many common tasks, for example accessing messages, reading message properties such as sender, receiver, message sent date, and message details. It also supports converting messages back and forth between EML, MSG and MHT formats. With Aspose.Email for Cloud, it is also possible to access messages and retrieve attachments that can then be saved to a local disc. The robust API saves developers time and effort when programming with emails in the cloud.


More about Aspose for Cloud


-View More Code Sample here: https://github.com/asposeforcloud/Aspose_Cloud_SDK_For_Ruby/wiki/Working-with-Email-file-formats-using-Aspose.Email

- Homepage of Aspose.Email for Cloud: http://www.aspose.com/cloud/email-api.aspx

-Aspose.Email for Cloud Documentation: http://www.aspose.com/docs/display/emailcloud/Home

- Download Aspose.Email for Cloud SDKs: http://www.aspose.com/docs/display/emailcloud/Available+SDKs

- Ask technical questions/queries from Aspose for Cloud Support Team: http://www.aspose.com/community/forums/default.aspx?GroupID=15


Contact Information

Aspose Pty Ltd,
Suite 163, 79 Longueville Road
Lane Cove, NSW, 2066
Australia
http://www.aspose.com/
sales@aspose.com
Phone: 888.277.6734
Fax: 866.810.9465



Latest Exclusive Press Release
XDR Market key Players Analysis, Applications, Forecasts to 2027
9 Best Vitamin and Mineral Supplements That Can Help Boost Your Immune System and Overall Health
Selective Laser Sintering Equipment Market by Manufacturer and Regions 2023
Generative Design Market Size Analysis | Autodesk, Altair, ANSYS, MSC Software
7 Things To Remember When Looking For The Best Commerical Cleaning Services For Your Business
Popular Press Release
A New Website Launches for Registereds to Apply, Find, and Interview for RN Travel Jobs in California
Zeng Fanzhi Parcours Exhibition 2016 in Beijing
Home Ministry’s Population Register Worse than Prisoner Identification
High Demand for a Computer Information Systems Degree
Feel-planet.com Has Made It Possible to Discover the Wonders of the World Online


Art & Entertainment Automotive Blogging & Social Media Business
Computer Design Education Environment
Events / Trade Shows Games & Entertainment Government Health and Fitness
Home & Family Industry Legal / Law Lifestyle
News & Society Politics Religion Sports
Technology Web sites / Internet