We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9d3506 commit c0bf22dCopy full SHA for c0bf22d
config/environments/production.rb
@@ -75,7 +75,21 @@
75
# config.action_mailer.raise_delivery_errors = false
76
77
# Mail delivery method
78
- config.action_mailer.delivery_method = :sendmail
+ if ENV['USE_SMTP']
79
+ config.action_mailer.delivery_method = :smtp
80
+ config.action_mailer.smtp_settings = {
81
+ address: ENV['SMTP_ADDRESS'],
82
+ port: ENV['SMTP_PORT'],
83
+ domain: ENV['SMTP_DOMAIN'],
84
+ user_name: ENV['SMTP_USERNAME'],
85
+ password: ENV['SMTP_PASSWORD'],
86
+ authentication: ENV['SMTP_AUTHENTICATION'],
87
+ enable_starttls_auto: true
88
+ }
89
+ else
90
+ config.action_mailer.delivery_method = :sendmail
91
+ end
92
+
93
94
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
95
# the I18n.default_locale when a translation cannot be found).
0 commit comments