The following program will send the mail with specified attachment file.Need to give the absolute path of the file.
require "rubygems"
require "ruport"
require "ruport/util"
r = Ruport::Report. new
r.add_mailer :default,
:host => "192.168.1. 1",
:address => "xxxx@bksys.co. in"
r.send_to("xxxx @bksys.co.in") do |mail|
mail.subject = "Hello"
mail.attach "foo.csv"
mail.text = "This is an email with attached csv file using ruport"
end
require "rubygems"
require "ruport"
require "ruport/util"
r = Ruport::Report. new
r.add_mailer :default,
:host => "192.168.1. 1",
:address => "xxxx@bksys.co. in"
r.send_to("xxxx @bksys.co.in") do |mail|
mail.subject = "Hello"
mail.attach "foo.csv"
mail.text = "This is an email with attached csv file using ruport"
end