Commit adca7cf062f55e553329a5c34a31ce05e2f5a94b
1 parent
73ba6850
Exists in
master
and in
2 other branches
rails_apps_composer: set email accounts
Showing
2 changed files
with
33 additions
and
0 deletions
Show diff stats
config/environments/development.rb
@@ -27,6 +27,23 @@ Rails.application.configure do | @@ -27,6 +27,23 @@ Rails.application.configure do | ||
27 | # number of complex assets. | 27 | # number of complex assets. |
28 | config.assets.debug = true | 28 | config.assets.debug = true |
29 | 29 | ||
30 | + config.action_mailer.smtp_settings = { | ||
31 | + address: "smtp.gmail.com", | ||
32 | + port: 587, | ||
33 | + domain: Rails.application.secrets.domain_name, | ||
34 | + authentication: "plain", | ||
35 | + enable_starttls_auto: true, | ||
36 | + user_name: Rails.application.secrets.email_provider_username, | ||
37 | + password: Rails.application.secrets.email_provider_password | ||
38 | + } | ||
39 | + # ActionMailer Config | ||
40 | + config.action_mailer.default_url_options = { :host => 'localhost:3000' } | ||
41 | + config.action_mailer.delivery_method = :smtp | ||
42 | + config.action_mailer.raise_delivery_errors = true | ||
43 | + # Send email in development mode? | ||
44 | + config.action_mailer.perform_deliveries = true | ||
45 | + | ||
46 | + | ||
30 | # Adds additional error checking when serving assets at runtime. | 47 | # Adds additional error checking when serving assets at runtime. |
31 | # Checks for improperly declared sprockets dependencies. | 48 | # Checks for improperly declared sprockets dependencies. |
32 | # Raises helpful error messages. | 49 | # Raises helpful error messages. |
config/environments/production.rb
@@ -72,6 +72,22 @@ Rails.application.configure do | @@ -72,6 +72,22 @@ Rails.application.configure do | ||
72 | # Send deprecation notices to registered listeners. | 72 | # Send deprecation notices to registered listeners. |
73 | config.active_support.deprecation = :notify | 73 | config.active_support.deprecation = :notify |
74 | 74 | ||
75 | + config.action_mailer.smtp_settings = { | ||
76 | + address: "smtp.gmail.com", | ||
77 | + port: 587, | ||
78 | + domain: Rails.application.secrets.domain_name, | ||
79 | + authentication: "plain", | ||
80 | + enable_starttls_auto: true, | ||
81 | + user_name: Rails.application.secrets.email_provider_username, | ||
82 | + password: Rails.application.secrets.email_provider_password | ||
83 | + } | ||
84 | + # ActionMailer Config | ||
85 | + config.action_mailer.default_url_options = { :host => Rails.application.secrets.domain_name } | ||
86 | + config.action_mailer.delivery_method = :smtp | ||
87 | + config.action_mailer.perform_deliveries = true | ||
88 | + config.action_mailer.raise_delivery_errors = false | ||
89 | + | ||
90 | + | ||
75 | # Disable automatic flushing of the log to improve performance. | 91 | # Disable automatic flushing of the log to improve performance. |
76 | # config.autoflush_log = false | 92 | # config.autoflush_log = false |
77 | 93 |