Skip to content

Commit dd4b048

Browse files
committed
Remove ActionMailer framework from config
I've tried to replicate (from memory) the changes that would be made if we ran app:update. So i've removed Notify related config, but commented out default config.
1 parent 7be525f commit dd4b048

4 files changed

Lines changed: 4 additions & 24 deletions

File tree

config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
require "active_record/railtie"
88
# require "active_storage/engine"
99
require "action_controller/railtie"
10-
require "action_mailer/railtie"
10+
# require "action_mailer/railtie"
1111
# require "action_mailbox/engine"
1212
# require "action_text/engine"
1313
require "action_view/railtie"

config/environments/development.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,6 @@
3131
# Change to :null_store to avoid any caching.
3232
config.cache_store = :memory_store
3333

34-
config.action_mailer.default_url_options = { host: Plek.find("govuk-chat") }
35-
36-
# Make template changes take effect immediately.
37-
config.action_mailer.perform_caching = false
38-
39-
## use these 2 lines to output to the console
40-
config.action_mailer.delivery_method = :test
41-
config.action_mailer.logger = Logger.new($stdout)
42-
43-
## use these 2 lines to send for real via Notify
44-
# config.action_mailer.delivery_method = :notify
45-
# config.action_mailer.notify_settings = { api_key: ENV["GOVUK_NOTIFY_API_KEY"] }
46-
4734
# Print deprecation notices to the Rails logger.
4835
config.active_support.deprecation = :log
4936

config/environments/production.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
# Disable caching for Action Mailer templates even if Action Controller
7070
# caching is enabled.
71-
config.action_mailer.perform_caching = false
71+
# config.action_mailer.perform_caching = false
7272

7373
# Ignore bad email addresses and do not raise email delivery errors.
7474
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
@@ -92,11 +92,4 @@
9292

9393
# Skip DNS rebinding protection for the default health check endpoint.
9494
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
95-
96-
config.action_mailer.default_url_options = { host: Plek.website_root }
97-
config.action_mailer.delivery_method = :notify
98-
config.action_mailer.notify_settings = {
99-
api_key: ENV["GOVUK_NOTIFY_API_KEY"],
100-
}
101-
config.action_mailer.perform_deliveries = ENV["DISABLE_MAIL_DELIVERY"].blank?
10295
end

config/environments/test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
# Tell Action Mailer not to deliver emails to the real world.
3333
# The :test delivery method accumulates sent emails in the
3434
# ActionMailer::Base.deliveries array.
35-
config.action_mailer.delivery_method = :test
35+
# config.action_mailer.delivery_method = :test
3636

3737
# Set host to be used by links generated in mailer templates.
38-
config.action_mailer.default_url_options = { host: "example.com" }
38+
# config.action_mailer.default_url_options = { host: "example.com" }
3939

4040
# Print deprecation notices to the stderr.
4141
config.active_support.deprecation = :stderr

0 commit comments

Comments
 (0)