Skip to content

Commit 8cca99c

Browse files
committed
Move mailer config out of an initializer.
1 parent 97bde79 commit 8cca99c

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

config/environments/development.rb

+9-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,16 @@
3232

3333
# Don't care if the mailer can't send.
3434
config.action_mailer.raise_delivery_errors = false
35-
3635
config.action_mailer.perform_caching = false
36+
config.action_mailer.delivery_method = :smtp
37+
config.action_mailer.smtp_settings = {
38+
address: "smtp.gmail.com",
39+
port: 587,
40+
domain: Rails.application.credentials.action_mailer.domain,
41+
user_name: Rails.application.credentials.action_mailer.user_name,
42+
password: Rails.application.credentials.action_mailer.password,
43+
authentication: "plain",
44+
enable_starttls_auto: true }
3745

3846
# Print deprecation notices to the Rails logger.
3947
config.active_support.deprecation = :log

config/environments/production.rb

+9
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@
5555
# config.active_job.queue_name_prefix = "wednesday_worlds_production"
5656

5757
config.action_mailer.perform_caching = false
58+
config.action_mailer.delivery_method = :smtp
59+
config.action_mailer.smtp_settings = {
60+
address: "smtp.gmail.com",
61+
port: 587,
62+
domain: Rails.application.credentials.action_mailer.domain,
63+
user_name: Rails.application.credentials.action_mailer.user_name,
64+
password: Rails.application.credentials.action_mailer.password,
65+
authentication: "plain",
66+
enable_starttls_auto: true }
5867

5968
# Ignore bad email addresses and do not raise email delivery errors.
6069
# Set this to true and configure the email server for immediate delivery to raise delivery errors.

config/initializers/mail.rb

-9
This file was deleted.

0 commit comments

Comments
 (0)