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

Once an application no longer requires constant development, it needs periodic maintenance for stable and secure operation. makandra offers monthly maintenance contracts that let you focus on your business while we make sure the lights stay on.

Owner of this card:

Emanuel De
Last edit:
19 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