Permalink
Browse files

rails_apps_composer: set email accounts

  • Loading branch information...
1 parent 5716436 commit 6c9193a271e003afb27dfee0d516f9e1bd30b6ad @nahurst committed Mar 17, 2013
Showing with 43 additions and 2 deletions.
  1. +19 −2 config/environments/development.rb
  2. +20 −0 config/environments/production.rb
  3. +4 −0 config/environments/test.rb
@@ -13,8 +13,25 @@
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
- # Don't care if the mailer can't send
- config.action_mailer.raise_delivery_errors = false
+ # ActionMailer Config
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
+ config.action_mailer.delivery_method = :smtp
+ # change to true to allow email to be sent during development
+ config.action_mailer.perform_deliveries = false
+ config.action_mailer.raise_delivery_errors = true
+ config.action_mailer.default :charset => "utf-8"
+
+ config.action_mailer.smtp_settings = {
+ address: "smtp.gmail.com",
+ port: 587,
+ domain: "example.com",
+ authentication: "plain",
+ enable_starttls_auto: true,
+ user_name: ENV["GMAIL_USERNAME"],
+ password: ENV["GMAIL_PASSWORD"]
+ }
+
+
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
@@ -61,6 +61,26 @@
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
+ config.action_mailer.default_url_options = { :host => 'example.com' }
+ # ActionMailer Config
+ # Setup for production - deliveries, no errors raised
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.perform_deliveries = true
+ config.action_mailer.raise_delivery_errors = false
+ config.action_mailer.default :charset => "utf-8"
+
+ config.action_mailer.smtp_settings = {
+ address: "smtp.gmail.com",
+ port: 587,
+ domain: "example.com",
+ authentication: "plain",
+ enable_starttls_auto: true,
+ user_name: ENV["GMAIL_USERNAME"],
+ password: ENV["GMAIL_PASSWORD"]
+ }
+
+
+
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5
@@ -34,4 +34,8 @@
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
+
+ # ActionMailer Config
+ config.action_mailer.default_url_options = { :host => 'example.com' }
+
end

0 comments on commit 6c9193a

Please sign in to comment.