diff options
author | Mark Longair <mhl@pobox.com> | 2013-09-23 16:03:29 +0100 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-10-29 13:52:39 +0000 |
commit | 150d7d8964ca153e66cab58b093375006e82c64f (patch) | |
tree | 27beef1be8af9c2391aa64cdf95061844199ffce /config/environments/development.rb | |
parent | 90fa620147476b9215eed17da53b156e395ec144 (diff) |
Add a config option for whether to use mailcatcher in development
Sometimes it's useful to be able to really send mail in development
mode, so add a config option for that.
Diffstat (limited to 'config/environments/development.rb')
-rw-r--r-- | config/environments/development.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb index 54ab2977f..a912dd5de 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -16,9 +16,14 @@ Alaveteli::Application.configure do # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_deliveries = true - # Use mailcatcher in development - config.action_mailer.delivery_method = :smtp # so is queued, rather than giving immediate errors - config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 } + + if AlaveteliConfiguration::use_mailcatcher_in_development + # Use mailcatcher in development + config.action_mailer.delivery_method = :smtp # so is queued, rather than giving immediate errors + config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 } + else + config.action_mailer.delivery_method = :sendmail + end # Writes useful log files to debug memory leaks, of the sort where have # unintentionally kept references to objects, especially strings. |