DEV: Only warn about invalid email setting in production
In development and test mode you don't care about email domains. Now that `rake db:migrate` outputs a lot less this felt like an error when it's really a warning.
This commit is contained in:
parent
338eaf9167
commit
8b2e7483b2
|
@ -5,6 +5,8 @@ if SiteSetting.notification_email == SiteSetting.defaults[:notification_email]
|
|||
begin
|
||||
SiteSetting.notification_email = "noreply@#{Discourse.current_hostname}"
|
||||
rescue Discourse::InvalidParameters
|
||||
STDERR.puts "Discourse hostname: #{Discourse.current_hostname} is not a valid domain for emails!"
|
||||
if Rails.env.production?
|
||||
STDERR.puts "WARNING: Discourse hostname: #{Discourse.current_hostname} is not a valid domain for emails!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue