2008-09-25
  1. Setup your ActionMailer. I'm using Google Mail for my stuff: http://www.rubyinside.com/how-to-use-gmails-smtp-server-with-rails-394.html
  2. ruby script/generate mailer testmailer
  3. Add this code to testmailer.rb (Testmailer < ActionMailer::Base)
    def test_mail(to)
    subject "My first email!"
    recipients "#{to}"
    from 'test'
    charset "utf-8"
    content_type 'text/html'
    body "Testing one two three..."
    end
  4. ruby script/console
  5. Testmailer.deliver_test_mail("you@yourdomain.com")

ActionMailer API doc

Leave a Reply