mirror of
https://github.com/discourse/discourse.git
synced 2024-11-21 16:38:15 -06:00
prevent the application from starting in development mode when SMTP settings are changed
This commit is contained in:
parent
5943483ef5
commit
da43e4cf29
@ -3,3 +3,8 @@ require File.expand_path('../application', __FILE__)
|
||||
|
||||
# Initialize the rails application
|
||||
Discourse::Application.initialize!
|
||||
|
||||
# When in "dev" mode, ensure we won't be sending any emails
|
||||
if Rails.env.development? && ActionMailer::Base.smtp_settings != { address: "localhost", port: 1025 }
|
||||
fail "In development mode, you should be using mailcatcher otherwise you might end up sending thousands of digest emails"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user