Working with Distribution Lists in Ruby

Aspose.Email - Working with Distribution Lists

To Create Distribution List using Aspose.Email Java for Ruby, simply invoke DistributionList module. Here you can see example code.

Ruby Code

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

oneOffmembers = Rjb::import('').new

oneOffmembers.addItem(Rjb::import('').new("John R. Patrick", ""))

oneOffmembers.addItem(Rjb::import('').new("Tilly Bates", ""))

dlist = Rjb::import('').new("Simple list", oneOffmembers)

dlist.setBody("Test body")

dlist.setSubject("Test subject")

dlist.setMileage("Test mileage")

dlist.setBilling("Test billing") + "distlist.msg")

puts "Saved distribution list successfully."

Download Running Code

Download Working with Distribution Lists (Aspose.Email) from any of the below mentioned social coding sites: