From: Joel Pearson Date: 2013-02-21T01:55:19+09:00 Subject: Re: Could you please post a program to send mail without using Action Mailer Here's the sort of thing I do using the mail gem. You can use gmail's smtp server if you have a gmail account set up: require 'mail' options = { :address => 'smtp.gmail.com', :port => 587, :user_name => 'example@gmail.com', :password => 'password', :authentication => 'plain', :enable_starttls_auto => true } Mail.defaults do delivery_method :smtp, options end Mail.deliver do from 'example@gmail.com' to %w(me@here.com you@there.com) subject 'Test' body 'Test email' if attachments.size != 0 && attachments[0] attachments.each {|filename| add_file(filename) } end end -- Posted via http://www.ruby-forum.com/.