Parsing Outlook Message Files in Ruby

Aspose.Email - Parsing Outlook Message Files

To Parse Outlook Message file using Aspose.Email Java for Ruby, simply invoke ParseOutlookMessageFile module. Here you can see example code.

Ruby Code


 data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

outlook_message_file = Rjb::import('com.aspose.email.MapiMessage').fromFile(data_dir + "Message.msg")

\# Display sender's name

puts "Sender Name : " + outlook_message_file.getSenderName().to_s

#Display Subject

puts "Subject : " + outlook_message_file.getSubject().to_s

\# Display Body

puts "Body : " + outlook_message_file.getBody().to_s

Download Running Code

Download Parsing Outlook Message Files (Aspose.Email) from any of the below mentioned social coding sites: