2019-05-03 06:17:27 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-03-21 22:28:52 +08:00
|
|
|
# Load the Rails application.
|
|
|
|
require_relative "application"
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2022-03-21 22:28:52 +08:00
|
|
|
# Initialize the Rails application.
|
|
|
|
Rails.application.initialize!
|
2016-06-03 23:39:54 +08:00
|
|
|
|
|
|
|
# When in "dev" mode, ensure we won't be sending any emails
|
2022-03-21 22:28:52 +08:00
|
|
|
if Rails.env.development? &&
|
|
|
|
ActionMailer::Base.smtp_settings.slice(:address, :port) != { address: "localhost", port: 1025 }
|
2021-10-05 18:18:06 +08:00
|
|
|
fail "In development mode, you should be using mailhog otherwise you might end up sending thousands of digest emails"
|
2016-06-03 23:39:54 +08:00
|
|
|
end
|