2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-04 17:32:34 +08:00
discourse/config/environment.rb
2023-01-09 11:13:29 +00:00

13 lines
474 B
Ruby

# frozen_string_literal: true
# Load the Rails application.
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
# When in "dev" mode, ensure we won't be sending any emails
if Rails.env.development? &&
ActionMailer::Base.smtp_settings.slice(:address, :port) != { address: "localhost", port: 1025 }
fail "In development mode, you should be using mailhog otherwise you might end up sending thousands of digest emails"
end