2019-05-03 08:17:27 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-03-23 11:57:59 +11:00
|
|
|
if SiteSetting.notification_email == SiteSetting.defaults[:notification_email]
|
|
|
|
# don't crash for invalid hostname, which is possible in dev
|
2015-03-23 12:16:21 +11:00
|
|
|
begin
|
|
|
|
SiteSetting.notification_email = "noreply@#{Discourse.current_hostname}"
|
|
|
|
rescue Discourse::InvalidParameters
|
2020-04-15 11:21:21 -04:00
|
|
|
if Rails.env.production?
|
|
|
|
STDERR.puts "WARNING: Discourse hostname: #{Discourse.current_hostname} is not a valid domain for emails!"
|
|
|
|
end
|
2015-03-23 12:16:21 +11:00
|
|
|
end
|
2015-03-23 11:57:59 +11:00
|
|
|
end
|