Skip to content

Instantly share code, notes, and snippets.

@HatemMahmoud
Last active December 23, 2015 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HatemMahmoud/6650710 to your computer and use it in GitHub Desktop.
Save HatemMahmoud/6650710 to your computer and use it in GitHub Desktop.
Testing ActionMailer configuration using Rails console
$ rails c
class MyMailer < ActionMailer::Base
default :from => 'actionmailer.debugger@example.com'
def test_email
mail(:to => "hatem@example.com", :subject => 'Testing from Rails console', :body => 'This is a test email')
end
end
MyMailer::test_email.deliver!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment