diff --git a/config/environments/development.rb b/config/environments/development.rb index 6f71970..707e8fa 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -42,6 +42,23 @@ # 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 + + # Suppress logger output for asset requests. config.assets.quiet = true diff --git a/config/environments/production.rb b/config/environments/production.rb index 53bc0ad..05ddfb0 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -68,6 +68,22 @@ # 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 + + # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new