asposeemailjava 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +3 -0
  3. data/LICENSE +21 -0
  4. data/README.md +32 -0
  5. data/Rakefile +2 -0
  6. data/asposeemailjava.gemspec +27 -0
  7. data/config/aspose.yml +5 -0
  8. data/data/Message.msg +0 -0
  9. data/data/Report.xlsx +0 -0
  10. data/data/aspose-logo.jpg +0 -0
  11. data/data/sample.pst +0 -0
  12. data/lib/asposeemailjava.rb +71 -0
  13. data/lib/asposeemailjava/Email/converter.rb +21 -0
  14. data/lib/asposeemailjava/Email/createnewemail.rb +38 -0
  15. data/lib/asposeemailjava/Email/customizeemailheaders.rb +44 -0
  16. data/lib/asposeemailjava/Email/extractemailheaders.rb +19 -0
  17. data/lib/asposeemailjava/Email/getemailinfo.rb +21 -0
  18. data/lib/asposeemailjava/Email/manageattachments.rb +43 -0
  19. data/lib/asposeemailjava/Email/savemessageasdraft.rb +39 -0
  20. data/lib/asposeemailjava/Email/updateemail.rb +58 -0
  21. data/lib/asposeemailjava/Outlook/addfiletopst.rb +17 -0
  22. data/lib/asposeemailjava/Outlook/addmapicalendartopst.rb +36 -0
  23. data/lib/asposeemailjava/Outlook/addmapicontacttopst.rb +58 -0
  24. data/lib/asposeemailjava/Outlook/addmapijournaltopst.rb +23 -0
  25. data/lib/asposeemailjava/Outlook/addmapinotetopst.rb +36 -0
  26. data/lib/asposeemailjava/Outlook/addmapitasktopst.rb +24 -0
  27. data/lib/asposeemailjava/Outlook/createoutlookcontact.rb +66 -0
  28. data/lib/asposeemailjava/Outlook/createoutlooknote.rb +17 -0
  29. data/lib/asposeemailjava/Outlook/createoutlooktask.rb +37 -0
  30. data/lib/asposeemailjava/Outlook/createpst.rb +19 -0
  31. data/lib/asposeemailjava/Outlook/distributionlist.rb +21 -0
  32. data/lib/asposeemailjava/Outlook/parseoutlookmessagefile.rb +18 -0
  33. data/lib/asposeemailjava/Outlook/searchmessagesandfoldersinpst.rb +45 -0
  34. data/lib/asposeemailjava/Outlook/stringsearchinpst.rb +22 -0
  35. data/lib/asposeemailjava/asposeemail.rb +2 -0
  36. data/lib/asposeemailjava/email.rb +8 -0
  37. data/lib/asposeemailjava/outlook.rb +14 -0
  38. data/lib/asposeemailjava/version.rb +3 -0
  39. data/samples/email.rb +16 -0
  40. data/samples/outlook.rb +22 -0
  41. metadata +140 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 95e441ff6ae432151d61565248f33740e4df10bb
4
+ data.tar.gz: 3a8e60255da512a8cdc14b1a2d699793eb8976e5
5
+ SHA512:
6
+ metadata.gz: f9f28e727f1000fca9f3315c1dcdb47483871ae77bcb75455d23e4933f19f18dbf9ab189f0b63f8fd4a142cf226e5f37249127c0edbb1d49f4b4c39a632c320f
7
+ data.tar.gz: 3ad3ee70bf1f51877083b7752396a1f0ccf2740912daf04360bda55b615f1d80787f833521aca09249e5647512625efb6a981f4df41dd42a99585f5b16d25b90
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2001-2015 Aspose Pty Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,32 @@
1
+ # Aspose_Email_Java_for_Ruby
2
+ Aspose.Email Java for Ruby is a gem that demonstrates / provides the Aspose.Email for Java API usage examples in Ruby by using Rjb - Ruby Java Bridge.
3
+
4
+ ## Installation
5
+
6
+ Execute following command.
7
+
8
+ $ gem install asposeemailjava
9
+
10
+ To download Aspose.Email for Java API to be used with these examples through RJB, Please navigate to:
11
+
12
+ http://www.aspose.com/community/files/72/java-components/aspose.email-for-java/default.aspx
13
+
14
+ Note: Create jars folder at root of the gem folder and copy downloaded Aspose.Email for java component into it.
15
+
16
+ For most complete documentation of the project, check Aspose.Email Java for Ruby confluence wiki link:
17
+
18
+ http://www.aspose.com/docs/display/emailjava/2.+Aspose.Email+Java+For+Ruby
19
+
20
+ ## Usage
21
+
22
+ ```ruby
23
+ require File.dirname(File.dirname(File.dirname(__FILE__))) + '/lib/asposeemailjava'
24
+ include Asposeemailjava
25
+ include Asposeemailjava::CreateNewEmail
26
+
27
+ initialize_aspose_email
28
+ ```
29
+ Lets understand the above code
30
+ * The first line makes sure that the Aspose.Email is loaded and available
31
+ * Include the files that are required to access the Aspose.Email
32
+ * Initialize the libraries. The aspose JAVA classes are loaded from the path provided in the aspose.yml file
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'asposeemailjava/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'asposeemailjava'
8
+ spec.version = Asposeemailjava::VERSION
9
+ spec.authors = ['Aspose Marketplace']
10
+ spec.email = ['marketplace@aspose.com']
11
+ spec.summary = %q{A Ruby gem to work with Aspose.Email for Java libraries}
12
+ spec.description = %q{AsposeEmailJava is a Ruby gem that can help working with Aspose.Email for Java libraries}
13
+ spec.homepage = 'https://github.com/asposeemail/Aspose_Email_Java/tree/master/Plugins/Aspose_Email_Java_for_Ruby'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.7'
22
+ spec.add_development_dependency 'rake', '~> 10.0'
23
+ spec.add_development_dependency 'rspec'
24
+
25
+ spec.add_dependency 'rjb', '~> 1.5.2'
26
+
27
+ end
@@ -0,0 +1,5 @@
1
+ jar_dir: ../asposeemailjava/jars
2
+ license_path: ../asposeemailjava/license/path
3
+ jvm_args: -Xms512m -Xmx1G
4
+
5
+
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,71 @@
1
+ require_relative 'asposeemailjava/version'
2
+ require_relative 'asposeemailjava/asposeemail'
3
+ require 'logger'
4
+ require 'rjb'
5
+
6
+ module Asposeemailjava
7
+
8
+ class << self
9
+ attr_accessor :aspose_email_config
10
+ end
11
+
12
+ def initialize_aspose_email
13
+ aspose_jars_dir = Asposeemailjava.aspose_email_config ? Asposeemailjava.aspose_email_config['jar_dir'] : nil
14
+ aspose_license_path = Asposeemailjava.aspose_email_config ? Asposeemailjava.aspose_email_config['license_path'] : nil
15
+ jvm_args = Asposeemailjava.aspose_email_config ? Asposeemailjava.aspose_email_config['jvm_args'] : nil
16
+
17
+ load_aspose_jars(aspose_jars_dir, jvm_args)
18
+ load_aspose_license(aspose_license_path)
19
+ end
20
+
21
+ def load_aspose_license(aspose_license_path)
22
+ if aspose_license_path && File.exist?(aspose_license_path)
23
+ set_license(File.join(aspose_license_path))
24
+ else
25
+ logger = Logger.new(STDOUT)
26
+ logger.level = Logger::WARN
27
+ logger.warn('Using the non licensed aspose jar. Please specify path to your aspose license directory in config/aspose.yml file!')
28
+ end
29
+ end
30
+
31
+ def load_aspose_jars(aspose_jars_dir, jvm_args)
32
+ if aspose_jars_dir && File.exist?(aspose_jars_dir)
33
+ jardir = File.join(aspose_jars_dir, '**', '*.jar')
34
+ else
35
+ jardir = File.join(File.dirname(File.dirname(__FILE__)), 'jars', '**', '*.jar')
36
+ end
37
+
38
+ if jvm_args
39
+ args = jvm_args.split(' ') << '-Djava.awt.headless=true'
40
+ logger = Logger.new(STDOUT)
41
+ logger.level = Logger::DEBUG
42
+ logger.debug("JVM args : #{args}")
43
+ Rjb::load(classpath = Dir.glob(jardir).join(':'), jvmargs=args)
44
+ else
45
+ Rjb::load(classpath = Dir.glob(jardir).join(':'), jvmargs=['-Djava.awt.headless=true'])
46
+ end
47
+
48
+ end
49
+
50
+ def input_file(file)
51
+ Rjb::import('java.io.FileInputStream').new(file)
52
+ end
53
+
54
+ def set_license(aspose_license_file)
55
+ begin
56
+ fstream = input_file(aspose_license_file)
57
+ license = Rjb::import('com.aspose.api.License').new()
58
+ license.setLicense(fstream)
59
+ rescue Exception => ex
60
+ logger = Logger.new(STDOUT)
61
+ logger.level = Logger::ERROR
62
+ logger.error("Could not load the license file : #{ex}")
63
+ fstream.close() if fstream
64
+ end
65
+ end
66
+
67
+ def self.configure_aspose_email config
68
+ Asposeemailjava.aspose_email_config = config
69
+ end
70
+
71
+ end
@@ -0,0 +1,21 @@
1
+ module Asposeemailjava
2
+ module Converter
3
+ def initialize()
4
+ # Loading EML, Saving to MSG
5
+ convert_eml_to_msg()
6
+ end
7
+
8
+ def convert_eml_to_msg()
9
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
10
+
11
+ # Initialize and Load an existing EML file by specifying the MessageFormat
12
+ eml = Rjb::import('com.aspose.email.MailMessage').load(data_dir + "Message.eml")
13
+
14
+ # Save the Email message to disk in Unicode format
15
+ eml.save(data_dir + "AnEmail.msg", Rjb::import('com.aspose.email.SaveOptions').getDefaultMsgUnicode())
16
+
17
+ # Display Status
18
+ puts "Converted eml to msg successfully."
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,38 @@
1
+ module Asposeemailjava
2
+ module CreateNewEmail
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Create a new instance of MailMessage class
7
+ message = Rjb::import('com.aspose.email.MailMessage').new
8
+
9
+ # Set subject of the message
10
+ message.setSubject("New message created by Aspose.Email for Java")
11
+
12
+ mail_address = Rjb::import('com.aspose.email.MailAddress')
13
+
14
+ # Set Html body
15
+ message.setHtmlBody("<b>This line is in bold.</b> <br/> <br/>" +
16
+ "<font color=blue>This line is in blue color</font>")
17
+
18
+ # Set sender information
19
+ message.setFrom(mail_address.new("from@domain.com", "Sender Name", false))
20
+
21
+ # Add TO recipients
22
+ message.getTo().add(mail_address.new("to1@domain.com", "Recipient 1", false))
23
+ message.getTo().add(mail_address.new("to2@domain.com", "Recipient 2", false))
24
+
25
+ # Add CC recipients
26
+ message.getCC().add(mail_address.new("cc1@domain.com", "Recipient 3", false))
27
+ message.getCC().add(mail_address.new("cc2@domain.com", "Recipient 4", false))
28
+
29
+ # Save message in EML and MSG formats
30
+ mail_message_save_type = Rjb::import('com.aspose.email.MailMessageSaveType')
31
+ message.save(data_dir + "Message.eml", mail_message_save_type.getEmlFormat())
32
+ message.save(data_dir + "Message.msg", mail_message_save_type.getOutlookMessageFormat())
33
+
34
+ # Display Status
35
+ puts "Created email messages Successfully."
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,44 @@
1
+ module Asposeemailjava
2
+ module CustomizeEmailHeaders
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Create a new instance of MailMessage class
7
+ message = Rjb::import('com.aspose.email.MailMessage').new
8
+
9
+ # Set subject of the message
10
+ message.setSubject("New message created by Aspose.Email for Java")
11
+
12
+ # Set Html body
13
+ message.setHtmlBody("<b>This line is in bold.</b> <br/> <br/>" +
14
+ "<font color=blue>This line is in blue color</font>")
15
+
16
+ # Set sender information
17
+ message.setFrom(Rjb::import('com.aspose.email.MailAddress').new("from@domain.com", "Sender Name", false))
18
+
19
+ # Add TO recipients
20
+ message.getTo().add(Rjb::import('com.aspose.email.MailAddress').new("to@domain.com", "Recipient 1", false))
21
+
22
+ # Message subject
23
+ message.setSubject("Customizing Email Headers")
24
+
25
+ # Specify Date
26
+ calendar = Rjb::import('java.util.Calendar').getInstance(Rjb::import('java.util.TimeZone').getTimeZone("GMT"))
27
+
28
+ date = calendar.getTime()
29
+ message.setDate(date)
30
+
31
+ # Specify XMailer
32
+ message.setXMailer("Aspose.Email")
33
+
34
+ # Specify Secret Header
35
+ message.getHeaders().add("secret-header", "mystery")
36
+
37
+ # Save message to disc
38
+ message.save(data_dir + "MsgHeaders.msg", Rjb::import('com.aspose.email.MessageFormat').getMsg())
39
+
40
+ # Display Status
41
+ puts "Customized message headers Successfully."
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,19 @@
1
+ module Asposeemailjava
2
+ module ExtractEmailHeaders
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Initialize and Load an existing EML file by specifying the MessageFormat
7
+ message = Rjb::import('com.aspose.email.MailMessage').load(data_dir + "Message.eml")
8
+
9
+ puts "Printing all Headers:"
10
+
11
+ # Print out all the headers
12
+ i=0
13
+ while i < message.getHeaders().getCount()
14
+ puts message.getHeaders().get(i)
15
+ i +=1
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,21 @@
1
+ module Asposeemailjava
2
+ module GetEmailInfo
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Create MailMessage instance by loading an Eml file
7
+ message_format = Rjb::import('com.aspose.email.MessageFormat')
8
+ message = Rjb::import('com.aspose.email.MailMessage').load(data_dir + "Message.eml")
9
+
10
+ puts "From: " + message.getFrom().to_string
11
+
12
+ puts "To: " + message.getTo().to_string
13
+
14
+ puts "Subject: " + message.getSubject().to_s
15
+
16
+ puts "HtmlBody: " + message.getHtmlBody().to_s
17
+
18
+ puts "TextBody: " + message.getTextBody().to_s
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,43 @@
1
+ module Asposeemailjava
2
+ module ManageAttachments
3
+ def initialize()
4
+ # Adding Attachments to a New Email Message
5
+ add_attachments()
6
+ end
7
+
8
+ def add_attachments()
9
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
10
+
11
+ # Create a new instance of MailMessage class
12
+ message = Rjb::import('com.aspose.email.MailMessage').new
13
+
14
+ # Set subject of the message
15
+ message.setSubject("New message created by Aspose.Email for Java")
16
+
17
+ mail_address = Rjb::import('com.aspose.email.MailAddress')
18
+
19
+ # Set Html body
20
+ message.setHtmlBody("<b>This line is in bold.</b> <br/> <br/>" +
21
+ "<font color=blue>This line is in blue color</font>")
22
+
23
+ # Set sender information
24
+ message.setFrom(mail_address.new("from@domain.com", "Sender Name", false))
25
+
26
+ # Add TO recipients
27
+ message.getTo().add(mail_address.new("to1@domain.com", "Recipient 1", false))
28
+
29
+ # Adding attachment
30
+ # Load an attachment
31
+ attachment = Rjb::import('com.aspose.email.Attachment').new(data_dir + "attachment.txt")
32
+
33
+ # Add attachment in instance of MailMessage class
34
+ message.addAttachment(attachment)
35
+
36
+ # Save message to disc
37
+ message.save(data_dir + "Add-Attachment.msg", Rjb::import('com.aspose.email.MessageFormat').getMsg())
38
+
39
+ # Display Status
40
+ puts "Added attachment successfully."
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,39 @@
1
+ module Asposeemailjava
2
+ module SaveMessageAsDraft
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Create a new instance of MailMessage class
7
+ message = Rjb::import('com.aspose.email.MailMessage').new
8
+
9
+ # Set subject of the message
10
+ message.setSubject("New message created by Aspose.Email for Java")
11
+
12
+ mail_address = Rjb::import('com.aspose.email.MailAddress')
13
+
14
+ # Set Html body
15
+ message.setHtmlBody("<b>This line is in bold.</b> <br/> <br/>" +
16
+ "<font color=blue>This line is in blue color</font>")
17
+
18
+ # Set sender information
19
+ message.setFrom(mail_address.new("from@domain.com", "Sender Name", false))
20
+
21
+ # Add TO recipients
22
+ message.getTo().add(mail_address.new("to1@domain.com", "Recipient 1", false))
23
+ message.getTo().add(mail_address.new("to2@domain.com", "Recipient 2", false))
24
+
25
+ # Create an instance of MapiMessage and load the MailMessag instance into it
26
+ mapi_msg = Rjb::import('com.aspose.email.MapiMessage').fromMailMessage(message)
27
+
28
+ # Set the MapiMessageFlags as UNSENT and FROMME
29
+ mapi_message_flags = Rjb::import('com.aspose.email.MapiMessageFlags')
30
+ mapi_msg.setMessageFlags(mapi_message_flags.MSGFLAG_UNSENT || mapi_message_flags.MSGFLAG_FROMME)
31
+
32
+ # Save the MapiMessage to disk
33
+ mapi_msg.save(data_dir + "New-Draft.msg")
34
+
35
+ # Display Status
36
+ puts "Draft saved Successfully."
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,58 @@
1
+ module Asposeemailjava
2
+ module UpdateEmail
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Initialize and Load an existing MSG file by specifying the MessageFormat
7
+ email = Rjb::import('com.aspose.email.MailMessage').load(data_dir + "Message.msg")
8
+
9
+ # Initialize a String variable to get the Email Subject
10
+ subject = email.getSubject()
11
+
12
+ # Append some more information to Subject
13
+ subject = subject + " This text is added to the existing subject"
14
+
15
+ # Set the Email Subject
16
+ email.setSubject(subject)
17
+
18
+ # Initialize a String variable to get the Email's HTML Body
19
+ body = email.getHtmlBody()
20
+
21
+ # Apppend some more information to the Body variable
22
+ body = body + "<br> This text is added to the existing body"
23
+
24
+ # Set the Email Body
25
+ email.setHtmlBody(body)
26
+
27
+ # Initialize MailAddressCollection object
28
+ contacts = Rjb::import('com.aspose.email.MailAddressCollection').new
29
+
30
+ # Retrieve Email's TO list
31
+ contacts = email.getTo()
32
+
33
+ # Add another email address to collection
34
+ contacts.add("to1@domain.com")
35
+
36
+ # Set the collection as Email's TO list
37
+ email.setTo(contacts)
38
+
39
+ # Initialize MailAddressCollection
40
+ contacts = Rjb::import('com.aspose.email.MailAddressCollection').new
41
+
42
+ # Retrieve Email's CC list
43
+ contacts = email.getCC()
44
+
45
+ # Add another email address to collection
46
+ contacts.add("cc2@domain.com")
47
+
48
+ # Set the collection as Email's CC list
49
+ email.setCC(contacts)
50
+
51
+ # Save the Email message to disk by specifying the MessageFormat
52
+ email.save(data_dir + "UpdateMessage.msg", Rjb::import('com.aspose.email.MailMessageSaveType').getOutlookMessageFormat())
53
+
54
+ # Display Status
55
+ puts "Updated email message Successfully."
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,17 @@
1
+ module Asposeemailjava
2
+ module AddFileToPST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ pst = Rjb::import('com.aspose.email.PersonalStorage').create(data_dir + "AddFile.pst", Rjb::import('com.aspose.email.FileFormatVersion').Unicode)
7
+
8
+ fi = pst.createPredefinedFolder("Inbox", Rjb::import('com.aspose.email.StandardIpmFolder').Inbox)
9
+
10
+ fi.addFile(data_dir + "Report.xlsx", "IPM.Document.Excel.Sheet.8")
11
+
12
+ pst.dispose()
13
+
14
+ puts "Added file to PST"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,36 @@
1
+ module Asposeemailjava
2
+ module AddMapiCalendarToPST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Create the appointment
7
+ appointment = Rjb::import('com.aspose.email.MapiCalendar').new(
8
+ "LAKE ARGYLE WA 6743",
9
+ "Appointment",
10
+ "This is a very important meeting :)",
11
+ Rjb::import('java.util.Date').new(2012, 10, 2),
12
+ Rjb::import('java.util.Date').new(2012, 10, 2, 14, 0, 0))
13
+
14
+ # Create the meeting
15
+ attendees = Rjb::import('com.aspose.email.MapiRecipientCollection').new
16
+ attendees.add("ReneeAJones@armyspy.com", "Renee A. Jones", Rjb::import('com.aspose.email.MapiRecipientType').MAPI_TO)
17
+ attendees.add("SzllsyLiza@dayrep.com", "Szollosy Liza", Rjb::import('com.aspose.email.MapiRecipientType').MAPI_TO)
18
+
19
+ meeting = Rjb::import('com.aspose.email.MapiCalendar').new(
20
+ "Meeting Room 3 at Office Headquarters",
21
+ "Meeting",
22
+ "Please confirm your availability.",
23
+ Rjb::import('java.util.Date').new(2012, 10, 2, 13, 0, 0),
24
+ Rjb::import('java.util.Date').new(2012, 10, 2, 14, 0, 0),
25
+ "CharlieKhan@dayrep.com",
26
+ attendees
27
+ )
28
+ pst = Rjb::import('com.aspose.email.PersonalStorage').create(data_dir + "MapiCalendarToPST.pst", Rjb::import('com.aspose.email.FileFormatVersion').Unicode)
29
+ calendar_folder = pst.createPredefinedFolder("Calendar", Rjb::import('com.aspose.email.StandardIpmFolder').Appointments)
30
+ calendar_folder.addMapiMessageItem(appointment)
31
+ calendar_folder.addMapiMessageItem(meeting)
32
+
33
+ puts "Added MapiCalendar Successfully."
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,58 @@
1
+ module Asposeemailjava
2
+ module AddMapiContactToPST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Create an instance of MapiContact
7
+ mapi_contact = Rjb::import('com.aspose.email.MapiContact')
8
+
9
+ # Contact #1
10
+ contact1 = mapi_contact.new("Sebastian Wright", "SebastianWright@dayrep.com")
11
+
12
+ # Contact #2
13
+ contact2 = mapi_contact.new("Wichert Kroos", "WichertKroos@teleworm.us", "Grade A Investment")
14
+
15
+ # Contact #3
16
+ contact3 = mapi_contact.new("Christoffer van de Meeberg", "ChristoffervandeMeeberg@teleworm.us", "Krauses Sofa Factory", "046-630-4614")
17
+
18
+ # Contact #4
19
+ contact4 = Rjb::import('com.aspose.email.MapiContact').new
20
+ contact4.setNameInfo(Rjb::import('com.aspose.email.MapiContactNamePropertySet').new("Margaret", "J.", "Tolle"))
21
+ contact4.getPersonalInfo().setGender(Rjb::import('com.aspose.email.MapiContactGender').Female)
22
+ contact4.setProfessionalInfo(Rjb::import('com.aspose.email.MapiContactProfessionalPropertySet').new("Adaptaz", "Recording engineer"))
23
+ contact4.getPhysicalAddresses().getWorkAddress().setAddress("4 Darwinia Loop EIGHTY MILE BEACH WA 6725")
24
+ contact4.getElectronicAddresses().setEmail1(Rjb::import('com.aspose.email.MapiContactElectronicAddress').new("Hisen1988", "SMTP", "MargaretJTolle@dayrep.com"))
25
+ contact4.getTelephones().setBusinessTelephoneNumber("(08)9080-1183")
26
+ contact4.getTelephones().setMobileTelephoneNumber("(925)599-3355")
27
+
28
+ # Contact #5
29
+ contact5 = Rjb::import('com.aspose.email.MapiContact').new
30
+ contact5.setNameInfo(Rjb::import('com.aspose.email.MapiContactNamePropertySet').new("Matthew", "R.", "Wilcox"))
31
+ contact5.getPersonalInfo().setGender(Rjb::import('com.aspose.email.MapiContactGender').Male)
32
+ contact5.setProfessionalInfo(Rjb::import('com.aspose.email.MapiContactProfessionalPropertySet').new("Briazz", "Psychiatric aide"))
33
+ contact5.getPhysicalAddresses().getWorkAddress().setAddress("Horner Strasse 12 4421 SAASS")
34
+ contact5.getTelephones().setBusinessTelephoneNumber("0650 675 73 30")
35
+ contact5.getTelephones().setHomeTelephoneNumber("(661)387-5382")
36
+
37
+ # Contact #6
38
+ contact6 = Rjb::import('com.aspose.email.MapiContact').new
39
+ contact6.setNameInfo(Rjb::import('com.aspose.email.MapiContactNamePropertySet').new("Bertha", "A.", "Buell"))
40
+ contact6.setProfessionalInfo(Rjb::import('com.aspose.email.MapiContactProfessionalPropertySet').new("Awthentikz", "Social work assistant"))
41
+ contact6.getPersonalInfo().setPersonalHomePage("B2BTies.com")
42
+ contact6.getPhysicalAddresses().getWorkAddress().setAddress("Im Astenfeld 59 8580 EDELSCHROTT")
43
+ contact6.getElectronicAddresses().setEmail1(Rjb::import('com.aspose.email.MapiContactElectronicAddress').new("Experwas", "SMTP", "BerthaABuell@armyspy.com"))
44
+ contact6.setTelephones(Rjb::import('com.aspose.email.MapiContactTelephonePropertySet').new("06605045265"))
45
+
46
+ pst = Rjb::import('com.aspose.email.PersonalStorage').create(data_dir + "MapiContactToPST.pst", Rjb::import('com.aspose.email.FileFormatVersion').Unicode)
47
+ contactFolder = pst.createPredefinedFolder("Contacts", Rjb::import('com.aspose.email.StandardIpmFolder').Contacts)
48
+ contactFolder.addMapiMessageItem(contact1)
49
+ contactFolder.addMapiMessageItem(contact2)
50
+ contactFolder.addMapiMessageItem(contact3)
51
+ contactFolder.addMapiMessageItem(contact4)
52
+ contactFolder.addMapiMessageItem(contact5)
53
+ contactFolder.addMapiMessageItem(contact6)
54
+
55
+ puts "Added MapiContacts Successfully."
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,23 @@
1
+ module Asposeemailjava
2
+ module AddMapiJournalToPST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ d1 = Rjb::import('java.util.Date').new
7
+ cl = Rjb::import('java.util.Calendar').getInstance()
8
+ cl.setTime(d1)
9
+ cl.add(Rjb::import('java.util.Calendar').HOUR, 1)
10
+ d2 = cl.getTime()
11
+
12
+ journal = Rjb::import('com.aspose.email.MapiJournal').new("daily record", "called out in the dark", "Phone call", "Phone call")
13
+ journal.setStartTime(d1)
14
+ journal.setEndTime(d2)
15
+
16
+ pst = Rjb::import('com.aspose.email.PersonalStorage').create(data_dir + "JournalPST.pst", Rjb::import('com.aspose.email.FileFormatVersion').Unicode)
17
+ journal_folder = pst.createPredefinedFolder("Journal", Rjb::import('com.aspose.email.StandardIpmFolder').Journal)
18
+ journal_folder.addMapiMessageItem(journal)
19
+
20
+ puts "Added MapiJournal Successfully."
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,36 @@
1
+ module Asposeemailjava
2
+ module AddMapiNoteToPST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ mess = Rjb::import('com.aspose.email.MapiMessage').fromFile(data_dir + "MapiNote.msg")
7
+
8
+ # Note #1
9
+ note1 = mess.toMapiMessageItem()
10
+ note1.setSubject("Yellow color note")
11
+ note1.setBody("This is a yellow color note")
12
+
13
+ # Note #2
14
+ note2 = mess.toMapiMessageItem()
15
+ note2.setSubject("Pink color note")
16
+ note2.setBody("This is a pink color note")
17
+ note2.setColor(Rjb::import('com.aspose.email.NoteColor').Pink)
18
+
19
+ # Note #3
20
+ note3 = mess.toMapiMessageItem()
21
+ note2.setSubject("Blue color note")
22
+ note2.setBody("This is a blue color note")
23
+ note2.setColor(Rjb::import('com.aspose.email.NoteColor').Blue)
24
+ note3.setHeight(500)
25
+ note3.setWidth(500)
26
+
27
+ pst = Rjb::import('com.aspose.email.PersonalStorage').create(data_dir + "MapiNoteToPST.pst", Rjb::import('com.aspose.email.FileFormatVersion').Unicode)
28
+ notes_folder = pst.createPredefinedFolder("Notes", Rjb::import('com.aspose.email.StandardIpmFolder').Notes)
29
+ notes_folder.addMapiMessageItem(note1)
30
+ notes_folder.addMapiMessageItem(note2)
31
+ notes_folder.addMapiMessageItem(note3)
32
+
33
+ puts "Added MapiNote Successfully."
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,24 @@
1
+ module Asposeemailjava
2
+ module AddMapiTaskToPST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ task = Rjb::import('com.aspose.email.MapiTask').new("To Do", "Just click and type to add new task", Rjb::import('java.util.Date').new, Rjb::import('java.util.Date').new)
7
+ task.setPercentComplete(20)
8
+ task.setEstimatedEffort(2000)
9
+ task.setActualEffort(20)
10
+ task.setHistory(Rjb::import('com.aspose.email.MapiTaskHistory').Assigned)
11
+ task.setLastUpdate(Rjb::import('java.util.Date').new)
12
+ task.getUsers().setOwner("Darius")
13
+ task.getUsers().setLastAssigner("Harkness")
14
+ task.getUsers().setLastDelegate("Harkness")
15
+ task.getUsers().setOwnership(Rjb::import('com.aspose.email.MapiTaskOwnership').AssignersCopy)
16
+
17
+ pst = Rjb::import('com.aspose.email.PersonalStorage').create(data_dir + "TaskPST.pst", Rjb::import('com.aspose.email.FileFormatVersion').Unicode)
18
+ task_folder = pst.createPredefinedFolder("Tasks", Rjb::import('com.aspose.email.StandardIpmFolder').Tasks)
19
+ task_folder.addMapiMessageItem(task)
20
+
21
+ puts "Added MapiTask Successfully."
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,66 @@
1
+ module Asposeemailjava
2
+ module CreateOutlookContact
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ contact = Rjb::import('com.aspose.email.MapiContact').new
7
+
8
+ # Set different properties of this Contact Item.
9
+
10
+ # Set Name properties using MapiContactNamePropertySet
11
+ name_prop_set = Rjb::import('com.aspose.email.MapiContactNamePropertySet').new
12
+ name_prop_set.setSurname("Mellissa")
13
+ name_prop_set.setGivenName("MacBeth")
14
+ contact.setNameInfo(name_prop_set)
15
+
16
+ # Set professional properties using MapiContactProfessionalPropertySet
17
+ prof_prop_set = Rjb::import('com.aspose.email.MapiContactProfessionalPropertySet').new
18
+ prof_prop_set.setTitle("Account Representative")
19
+ prof_prop_set.setCompanyName("Contoso Ltd.")
20
+ prof_prop_set.setOfficeLocation("36/2529")
21
+ contact.setProfessionalInfo(prof_prop_set)
22
+
23
+ # Telephones
24
+ telephone = Rjb::import('com.aspose.email.MapiContactTelephonePropertySet').new
25
+ telephone.setAssistantTelephoneNumber("(831) 758-7214")
26
+ telephone.setBusiness2TelephoneNumber("(831) 759-2518")
27
+ telephone.setBusinessTelephoneNumber("(831) 758-7285")
28
+ telephone.setCallbackTelephoneNumber("(831) 758-7321 (After hours")
29
+ telephone.setCarTelephoneNumber("(831) 758-7201")
30
+ telephone.setCompanyMainTelephoneNumber("(831) 758-7368")
31
+ telephone.setHome2TelephoneNumber("(831) 758-7256")
32
+ telephone.setHomeTelephoneNumber("(831) 758-7257")
33
+ telephone.setIsdnNumber("(831) 758-7381")
34
+ telephone.setMobileTelephoneNumber("(831) 758-7368")
35
+ telephone.setOtherTelephoneNumber("(831) 758-7201")
36
+ telephone.setPagerTelephoneNumber("(831) 758-7368")
37
+ telephone.setPrimaryTelephoneNumber("(831) 758-7334")
38
+ telephone.setRadioTelephoneNumber("(831) 758-7234")
39
+ telephone.setTelexNumber("(831) 758-7408")
40
+ telephone.setTtyTddPhoneNumber("(800) 806-4474")
41
+ contact.setTelephones(telephone)
42
+
43
+ # Set Physical Address using MapiContactPhysicalAddress and MapiContactPhysicalAddressPropertySet
44
+ phys_addrss = Rjb::import('com.aspose.email.MapiContactPhysicalAddress').new
45
+ phys_addrss.setPostOfficeBox("144 Hitchcock Rd, Salinas, CA 93908")
46
+
47
+ phys_addr_prop_set = Rjb::import('com.aspose.email.MapiContactPhysicalAddressPropertySet').new
48
+ phys_addr_prop_set.setWorkAddress(phys_addrss)
49
+ contact.setPhysicalAddresses(phys_addr_prop_set)
50
+
51
+ # Set email information using MapiContactElectronicAddress and MapiContactElectronicAddressPropertySet
52
+ email = Rjb::import('com.aspose.email.MapiContactElectronicAddress').new
53
+ email.setAddressType("SMTP")
54
+ email.setDisplayName("Melissa MacBeth (mellissa@contoso.com)")
55
+ email.setEmailAddress("melissa@contoso.com")
56
+
57
+ elec_addr_prop_set = Rjb::import('com.aspose.email.MapiContactElectronicAddressPropertySet').new
58
+ elec_addr_prop_set.setEmail1(email)
59
+ contact.setElectronicAddresses(elec_addr_prop_set)
60
+
61
+ contact.save(data_dir + "OutlookContact.vcf", Rjb::import('com.aspose.email.ContactSaveFormat').VCard)
62
+
63
+ puts "Created outlook contact successfully."
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,17 @@
1
+ module Asposeemailjava
2
+ module CreateOutlookNote
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ note = Rjb::import('com.aspose.email.MapiNote').new
7
+ note.setSubject("Blue color note")
8
+ note.setBody("This is a blue color note")
9
+ note.setColor(Rjb::import('com.aspose.email.NoteColor').Blue)
10
+ note.setHeight(500)
11
+ note.setWidth(500)
12
+ note.save(data_dir + "MapiNote.msg", Rjb::import('com.aspose.email.NoteSaveFormat').Msg)
13
+
14
+ puts "Created outlook note successfully."
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,37 @@
1
+ module Asposeemailjava
2
+ module CreateOutlookTask
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ contact = Rjb::import('com.aspose.email.MapiContact').new
7
+
8
+ calendar = Rjb::import('java.util.Calendar').getInstance(Rjb::import('java.util.TimeZone').getTimeZone("GMT"))
9
+ calendar.set(2012, calendar.NOVEMBER, 1, 0, 0, 0)
10
+ startDate = calendar.getTime()
11
+ calendar.set(2012, calendar.DECEMBER, 1)
12
+ endDate = calendar.getTime()
13
+
14
+ task = Rjb::import('com.aspose.email.MapiTask').new("To Do", "Just click and type to add new task", startDate, endDate)
15
+ task.setPercentComplete(20)
16
+ task.setEstimatedEffort(2000)
17
+ task.setActualEffort(20)
18
+ task.setHistory(Rjb::import('com.aspose.email.MapiTaskHistory').Assigned)
19
+ task.getUsers().setOwner("Darius")
20
+ task.getUsers().setLastAssigner("Harkness")
21
+ task.getUsers().setLastDelegate("Harkness")
22
+ task.getUsers().setOwnership(Rjb::import('com.aspose.email.MapiTaskOwnership').AssignersCopy)
23
+ companies = ["company1", "company2", "company3"]
24
+ task.setCompanies(companies)
25
+ categories = ["category1", "category2", "category3"]
26
+ task.setCategories(categories)
27
+ task.setMileage("Some test mileage")
28
+ task.setBilling("Test billing information")
29
+ task.getUsers().setDelegator("Test Delegator")
30
+ task.setSensitivity(Rjb::import('com.aspose.email.MapiSensitivity').Personal)
31
+ task.setStatus(Rjb::import('com.aspose.email.MapiTaskStatus').Complete)
32
+ task.save(data_dir + "MapiTask.msg", Rjb::import('com.aspose.email.TaskSaveFormat').Msg)
33
+
34
+ puts "Created outlook task successfully."
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,19 @@
1
+ module Asposeemailjava
2
+ module CreatePST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Create an instance of PersonalStorage
7
+ pst = Rjb::import('com.aspose.email.PersonalStorage').create(data_dir + "sample1.pst", 0)
8
+
9
+ # Create a folder at root of pst
10
+ pst.getRootFolder().addSubFolder("myInbox")
11
+
12
+ # Add message to newly created folder
13
+ mapi_message = Rjb::import('com.aspose.email.MapiMessage')
14
+ pst.getRootFolder().getSubFolder("myInbox").addMessage(mapi_message.fromFile(data_dir + "Message.msg"))
15
+
16
+ puts "Created PST successfully."
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,21 @@
1
+ module Asposeemailjava
2
+ module DistributionList
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ oneOffmembers = Rjb::import('com.aspose.email.MapiDistributionListMemberCollection').new
7
+ oneOffmembers.addItem(Rjb::import('com.aspose.email.MapiDistributionListMember').new("John R. Patrick", "JohnRPatrick@armyspy.com"))
8
+ oneOffmembers.addItem(Rjb::import('com.aspose.email.MapiDistributionListMember').new("Tilly Bates", "TillyBates@armyspy.com"))
9
+
10
+ dlist = Rjb::import('com.aspose.email.MapiDistributionList').new("Simple list", oneOffmembers)
11
+ dlist.setBody("Test body")
12
+ dlist.setSubject("Test subject")
13
+ dlist.setMileage("Test mileage")
14
+ dlist.setBilling("Test billing")
15
+
16
+ dlist.save(data_dir + "distlist.msg")
17
+
18
+ puts "Saved distribution list successfully."
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,18 @@
1
+ module Asposeemailjava
2
+ module ParseOutlookMessageFile
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ outlook_message_file = Rjb::import('com.aspose.email.MapiMessage').fromFile(data_dir + "Message.msg")
7
+
8
+ # Display sender's name
9
+ puts "Sender Name : " + outlook_message_file.getSenderName().to_s
10
+
11
+ #Display Subject
12
+ puts "Subject : " + outlook_message_file.getSubject().to_s
13
+
14
+ # Display Body
15
+ puts "Body : " + outlook_message_file.getBody().to_s
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,45 @@
1
+ module Asposeemailjava
2
+ module SearchMessagesAndFoldersInPST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Load the Outlook PST file
7
+ pst = Rjb::import('com.aspose.email.PersonalStorage').fromFile(data_dir + "sample.pst")
8
+
9
+ folder = pst.getRootFolder().getSubFolder("myInbox")
10
+ builder = Rjb::import('com.aspose.email.PersonalStorageQueryBuilder').new
11
+
12
+ # High importance messages
13
+ builder.getImportance().equals(Rjb::import('com.aspose.email.MapiImportance').High)
14
+ messages = folder.getContents(builder.getQuery())
15
+ puts "Messages with High Imp:" + messages.size().to_s
16
+
17
+ #builder = new PersonalStorageQueryBuilder();
18
+ builder.getMessageClass().equals("IPM.Note")
19
+ messages = folder.getContents(builder.getQuery())
20
+ puts "Messages with IPM.Note:" + messages.size().to_s
21
+
22
+ # Messages with attachments AND high importance
23
+ builder.getImportance().equals(Rjb::import('com.aspose.email.MapiImportance').High)
24
+ builder.hasFlags(Rjb::import('com.aspose.email.MapiMessageFlags').MSGFLAG_HASATTACH)
25
+ messages = folder.getContents(builder.getQuery())
26
+ puts "Messages with atts: " + messages.size().to_s
27
+
28
+ # Messages with size > 15 KB
29
+ builder.getMessageSize().greater(15000)
30
+ messages = folder.getContents(builder.getQuery())
31
+ puts "messags size > 15Kb:" + messages.size().to_s
32
+
33
+ # Unread messages
34
+ builder.hasNoFlags(Rjb::import('com.aspose.email.MapiMessageFlags').MSGFLAG_READ)
35
+ messages = folder.getContents(builder.getQuery())
36
+ puts "Unread:" + messages.size().to_s
37
+
38
+ # Unread messages with attachments
39
+ builder.hasNoFlags(Rjb::import('com.aspose.email.MapiMessageFlags').MSGFLAG_READ)
40
+ builder.hasFlags(Rjb::import('com.aspose.email.MapiMessageFlags').MSGFLAG_HASATTACH)
41
+ messages = folder.getContents(builder.getQuery())
42
+ puts "Unread msgs with atts: " + messages.size().to_s
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,22 @@
1
+ module Asposeemailjava
2
+ module StringSearchInPST
3
+ def initialize()
4
+ data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
5
+
6
+ # Load the Outlook PST file
7
+ pst = Rjb::import('com.aspose.email.PersonalStorage').create(data_dir + "search.pst", Rjb::import('com.aspose.email.FileFormatVersion').Unicode)
8
+
9
+ fi = pst.createPredefinedFolder("Inbox", Rjb::import('com.aspose.email.StandardIpmFolder').Inbox)
10
+
11
+ fi.addMessage(Rjb::import('com.aspose.email.MapiMessage').fromMailMessage(Rjb::import('com.aspose.email.MailMessage').load(data_dir + "search.pst")))
12
+
13
+ builder = Rjb::import('com.aspose.email.MailQueryBuilder').new
14
+ builder.getFrom().contains("automated", true)
15
+
16
+ query = builder.getQuery()
17
+ coll = fi.getContents(query)
18
+
19
+ puts "Total Results:" + coll.size().to_s
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,2 @@
1
+ require_relative 'email'
2
+ require_relative 'outlook'
@@ -0,0 +1,8 @@
1
+ require_relative 'Email/createnewemail'
2
+ require_relative 'Email/updateemail'
3
+ require_relative 'Email/savemessageasdraft'
4
+ require_relative 'Email/customizeemailheaders'
5
+ require_relative 'Email/manageattachments'
6
+ require_relative 'Email/getemailinfo'
7
+ require_relative 'Email/extractemailheaders'
8
+ require_relative 'Email/converter'
@@ -0,0 +1,14 @@
1
+ require_relative 'Outlook/parseoutlookmessagefile'
2
+ require_relative 'Outlook/createoutlookcontact'
3
+ require_relative 'Outlook/createoutlooktask'
4
+ require_relative 'Outlook/createoutlooknote'
5
+ require_relative 'Outlook/distributionlist'
6
+ require_relative 'Outlook/createpst'
7
+ require_relative 'Outlook/addmapicontacttopst'
8
+ require_relative 'Outlook/addmapitasktopst'
9
+ require_relative 'Outlook/addmapijournaltopst'
10
+ require_relative 'Outlook/addmapicalendartopst'
11
+ require_relative 'Outlook/addmapinotetopst'
12
+ require_relative 'Outlook/addfiletopst'
13
+ require_relative 'Outlook/searchmessagesandfoldersinpst'
14
+ require_relative 'Outlook/stringsearchinpst'
@@ -0,0 +1,3 @@
1
+ module Asposeemailjava
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,16 @@
1
+ =begin
2
+ Please uncomment the code which you want to execute.
3
+ =end
4
+
5
+ require '../lib/asposeemailjava'
6
+ include Asposeemailjava
7
+ #include Asposeemailjava::CreateNewEmail
8
+ #include Asposeemailjava::UpdateEmail
9
+ #include Asposeemailjava::SaveMessageAsDraft
10
+ #include Asposeemailjava::CustomizeEmailHeaders
11
+ #include Asposeemailjava::ManageAttachments
12
+ #include Asposeemailjava::GetEmailInfo
13
+ #include Asposeemailjava::ExtractEmailHeaders
14
+ #include Asposeemailjava::Converter
15
+
16
+ initialize_aspose_email
@@ -0,0 +1,22 @@
1
+ =begin
2
+ Please uncomment the code which you want to execute.
3
+ =end
4
+
5
+ require '../lib/asposeemailjava'
6
+ include Asposeemailjava
7
+ #include Asposeemailjava::ParseOutlookMessageFile
8
+ #include Asposeemailjava::CreateOutlookContact
9
+ #include Asposeemailjava::CreateOutlookTask
10
+ #include Asposeemailjava::CreateOutlookNote
11
+ #include Asposeemailjava::DistributionList
12
+ #include Asposeemailjava::CreatePST
13
+ #include Asposeemailjava::AddMapiContactToPST
14
+ #include Asposeemailjava::AddMapiTaskToPST
15
+ #include Asposeemailjava::AddMapiJournalToPST
16
+ #include Asposeemailjava::AddMapiCalendarToPST
17
+ #include Asposeemailjava::AddMapiNoteToPST
18
+ #include Asposeemailjava::AddFileToPST
19
+ #include Asposeemailjava::SearchMessagesAndFoldersInPST
20
+ #include Asposeemailjava::StringSearchInPST
21
+
22
+ initialize_aspose_email
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: asposeemailjava
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Aspose Marketplace
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rjb
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.5.2
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.5.2
69
+ description: AsposeEmailJava is a Ruby gem that can help working with Aspose.Email
70
+ for Java libraries
71
+ email:
72
+ - marketplace@aspose.com
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - Gemfile
78
+ - LICENSE
79
+ - README.md
80
+ - Rakefile
81
+ - asposeemailjava.gemspec
82
+ - config/aspose.yml
83
+ - data/Message.msg
84
+ - data/Report.xlsx
85
+ - data/aspose-logo.jpg
86
+ - data/sample.pst
87
+ - lib/asposeemailjava.rb
88
+ - lib/asposeemailjava/Email/converter.rb
89
+ - lib/asposeemailjava/Email/createnewemail.rb
90
+ - lib/asposeemailjava/Email/customizeemailheaders.rb
91
+ - lib/asposeemailjava/Email/extractemailheaders.rb
92
+ - lib/asposeemailjava/Email/getemailinfo.rb
93
+ - lib/asposeemailjava/Email/manageattachments.rb
94
+ - lib/asposeemailjava/Email/savemessageasdraft.rb
95
+ - lib/asposeemailjava/Email/updateemail.rb
96
+ - lib/asposeemailjava/Outlook/addfiletopst.rb
97
+ - lib/asposeemailjava/Outlook/addmapicalendartopst.rb
98
+ - lib/asposeemailjava/Outlook/addmapicontacttopst.rb
99
+ - lib/asposeemailjava/Outlook/addmapijournaltopst.rb
100
+ - lib/asposeemailjava/Outlook/addmapinotetopst.rb
101
+ - lib/asposeemailjava/Outlook/addmapitasktopst.rb
102
+ - lib/asposeemailjava/Outlook/createoutlookcontact.rb
103
+ - lib/asposeemailjava/Outlook/createoutlooknote.rb
104
+ - lib/asposeemailjava/Outlook/createoutlooktask.rb
105
+ - lib/asposeemailjava/Outlook/createpst.rb
106
+ - lib/asposeemailjava/Outlook/distributionlist.rb
107
+ - lib/asposeemailjava/Outlook/parseoutlookmessagefile.rb
108
+ - lib/asposeemailjava/Outlook/searchmessagesandfoldersinpst.rb
109
+ - lib/asposeemailjava/Outlook/stringsearchinpst.rb
110
+ - lib/asposeemailjava/asposeemail.rb
111
+ - lib/asposeemailjava/email.rb
112
+ - lib/asposeemailjava/outlook.rb
113
+ - lib/asposeemailjava/version.rb
114
+ - samples/email.rb
115
+ - samples/outlook.rb
116
+ homepage: https://github.com/asposeemail/Aspose_Email_Java/tree/master/Plugins/Aspose_Email_Java_for_Ruby
117
+ licenses:
118
+ - MIT
119
+ metadata: {}
120
+ post_install_message:
121
+ rdoc_options: []
122
+ require_paths:
123
+ - lib
124
+ required_ruby_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ required_rubygems_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ requirements: []
135
+ rubyforge_project:
136
+ rubygems_version: 2.4.5
137
+ signing_key:
138
+ specification_version: 4
139
+ summary: A Ruby gem to work with Aspose.Email for Java libraries
140
+ test_files: []