From: Gregory Brown Date: 2007-06-08T04:48:32+09:00 Subject: Re: Help with emailing attachments with Ruby... On 6/1/07, grooveska wrote: > I am working on a script that will send an email with a .csv file > attachment. I can get everything set correctly, and the email gets > sent properly. The problem is with the attachments. This maybe a MIME > thing instead of something wrong with my script. My script is based > on an example from Hal Fulton's The Ruby Way book. If anyone has any > suggestions or see something I did wrong I would greatly appreciate > it. Hi, with ruport-util, that looks like this: require "rubygems" require "ruport" require "ruport/util" r = Ruport::Report.new r.add_mailer :default, :host => "mail.adelphia.net", :address => "gregory.t.brown@gmail.com" r.send_to("gregory.t.brown@gmail.com") do |mail| mail.subject = "Hello" mail.attach "foo.csv" mail.text = "This is an email with attached csv" end I understand if you want to lighten the dependency load, so you might just want to use the lib we wrap, MailFactory.