Get the mail gem from here. And add require 'mail' to your ruby application of course!

Configuration

Remote/Local SMTP

  options = {
  :address              => "claw.triple6.org",
  :port                 => 25,
  :domain               => 'claw.triple6.org',
  :user_name            => 'username',
  :password             => 'securepassword',
  :authentication       => 'plain',
  :enable_starttls_auto => true, # Enables starttls
  :openssl_verify_mode => 'none' # Allows certificate to be self signed
  }

Mail.defaults do
  delivery_method :smtp, options
end

##Sending

Plaintext

Mail.deliver do
  to "somebody@gmail.com"
  from 'admin@triple6.org'
  subject 'Test Mail'
  body '
Hey there!
How are you?'
  end
end

HTML

Mail.deliver do
  to "somebody@gmail.com"
  from 'admin@triple6.org'
  subject 'Test Mail'
  content_type 'text/html; charset=UTF-8'
  body '<br>
Hey there!<br>
<strong>How are you?</strong>'
  end
end