I'm on Heroku, and emails don't get sent out in development, but are properly being sent in production. I'd like to run a seperate staging instance on Heroku, but don't want emails being sent out (just to a log).
views:
41answers:
2
+1
A:
put this in your environment.rb file
config.action_mailer.delivery_method = :test
It should stop sending mail to the mail server, I think there is a :log option, but I have not tried it out.
Chiwai Chan
2010-06-16 22:32:49
You probably want it in a separate `environments/staging.rb` file, though, and not in the global `environment.rb` file.
rspeicher
2010-06-17 01:04:57
+1
A:
This line in test.rb tells ActionMailer not to deliver emails:
config.action_mailer.delivery_method = :test
Instead, they are accumulated in the ActionMailer::Base.deliveries array.
You'll need to set up a staging environment for your application and configure Heroku to use that environment on your staging instance.
Alex - Aotea Studios
2010-06-16 22:34:22