File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 75
75
# config.action_mailer.raise_delivery_errors = false
76
76
77
77
# Mail delivery method
78
- config . action_mailer . delivery_method = :sendmail
78
+ 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
+
79
93
80
94
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
81
95
# the I18n.default_locale when a translation cannot be found).
You can’t perform that action at this time.
0 commit comments