diff --git a/config/environments/development.rb b/config/environments/development.rb index ddf0e90..df9854e 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -27,6 +27,23 @@ Rails.application.configure do # number of complex assets. config.assets.debug = true + config.action_mailer.smtp_settings = { + address: "smtp.gmail.com", + port: 587, + domain: Rails.application.secrets.domain_name, + authentication: "plain", + enable_starttls_auto: true, + user_name: Rails.application.secrets.email_provider_username, + password: Rails.application.secrets.email_provider_password + } + # ActionMailer Config + config.action_mailer.default_url_options = { :host => 'localhost:3000' } + config.action_mailer.delivery_method = :smtp + config.action_mailer.raise_delivery_errors = true + # Send email in development mode? + config.action_mailer.perform_deliveries = true + + # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. diff --git a/config/environments/production.rb b/config/environments/production.rb index 47d3553..8d10ebf 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -72,6 +72,22 @@ Rails.application.configure do # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify + config.action_mailer.smtp_settings = { + address: "smtp.gmail.com", + port: 587, + domain: Rails.application.secrets.domain_name, + authentication: "plain", + enable_starttls_auto: true, + user_name: Rails.application.secrets.email_provider_username, + password: Rails.application.secrets.email_provider_password + } + # ActionMailer Config + config.action_mailer.default_url_options = { :host => Rails.application.secrets.domain_name } + config.action_mailer.delivery_method = :smtp + config.action_mailer.perform_deliveries = true + config.action_mailer.raise_delivery_errors = false + + # Disable automatic flushing of the log to improve performance. # config.autoflush_log = false -- libgit2 0.21.2