I want to test my registration process locally (development mode), how can I test how emails will be sent out and rendered etc?
I am not referring to a unit-test or integration test, but just while developing my app and going on the register page etc. I want it to send out the emails but to a file not using smtp.
Is this possible?
What options do I have?
This is configurable in the config/environments/*.rb
files.
# output to tmp/mails directory config.action_mailer.delivery_method = :file # ... and to specify output location # config.action_mailer.file_settings = { :location => Rails.root.join('tmp/mail') }
Detailed information can be found in the config section of Action Mailer Basics or on ActionMailer::Base API
Rails 4.2 :file
delivery method source and Mail::FileDelivery source
LetterOpener makes it even simpler for you to preview the emails you just sent by opening the file in the browser automatically (in development environment of course).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With