1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
require 'rubygems'
require 'mail'
begin
require 'ruby-debug'
rescue LoadError
STDERR.puts "Continuing without ruby-debug"
end
smtp = { :address => 'mail.fiendz.org', :port => 587, :domain => 'fiendz.org', :user_name => 'test@fiendz.org', :password => 'foobar', :enable_starttls_auto => true, :openssl_verify_mode => 'none' }
Mail.defaults { delivery_method :smtp, smtp }
mail = Mail.new do
from 'test@fiendz.org'
to 'donald.ball@gmail.com'
subject 'subject'
body 'body'
end
mail.deliver!
|