mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 06:15:28 +08:00
9 lines
377 B
Ruby
9 lines
377 B
Ruby
if SiteSetting.notification_email == SiteSetting.defaults[:notification_email]
|
|
# don't crash for invalid hostname, which is possible in dev
|
|
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!"
|
|
end
|
|
end
|