Posted about 1 month ago. Visible to the public.

Rails: How to send a test mail directly from the console

I use this Code Snippet quite often to debug issues with mails on staging and production servers. It allows you to send a custom mail directly from the console.

ActionMailer::Base.mail( from: "", to: "", subject: "Test mail from #{Rails.application.class}", body: "This is just a test." ).deliver_now
Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Owner of this card:

Emanuel De
Last edit:
26 days ago
by Emanuel De
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Emanuel De to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more