Skip to content
Add a rake task to test your mail configuration on Rails 3
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Hello Mail

So I was tired of doing different stuff to test email configuration on my many environments so I came up with this simple Rake task to send me a test email.


Rails 3

Include it on your Gemfile

gem 'hello_mail'

And then run:

bundler install

Other versions of Rails

Nope, this gem is just for Rails 3


Simply run the rake task passing the destination mail address as a parameter, for example:

rake hello_mail:deliver[]

If your mail configuration works, you shall receive a message immediately.

Be careful if you have different environments configured on your server. If you run your app in production mode, then you should run the rake task as:

RAILS_ENV=production rake hello_mail:deliver[]

That's it!

About the Author

Crowd Interactive is an American web design and development company that happens to work in Colima, Mexico. We specialize in building and growing online retail stores. We don’t work with everyone – just companies we believe in. Call us today to see if there’s a fit. Find more info here!

Something went wrong with that request. Please try again.