require 'action_mailer' class SimpleSmtpTestMailer < ActionMailer::Base def test_email(to, body='This message was generated by the Simple SMTP Test program for Ruby on Rails.') from = ENV['MAILER_FROM_EMAIL'] || 'do-not-reply@example.com' subject = 'This is a test email from Simple SMTP test' mail to:to, from:from, subject:subject, body:body end end