Skip to content

Testing changes in outgoing emails

David Cabo edited this page Feb 12, 2015 · 1 revision
  1. Start mailcatcher:

     $ mailcatcher
     Starting MailCatcher
     ==> smtp://127.0.0.1:1025
     ==> http://127.0.0.1:1080
     *** MailCatcher runs as a daemon by default. Go to the web interface to quit.
    
  2. Open a Rails console:

     $ script/rails console
    
  3. Send an email via RequestMailer:

     > r = InfoRequest.last
     > RequestMailer.overdue_alert(r, r.user).deliver
    

That's it, your outgoing email should show up in MailCatcher. And you don't need to restart the Rails console for edits to the template to take effect. Yay.