From 0cde4b1889adcca2cb88c4749384d51b6dfcdb93 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Thu, 28 Mar 2013 16:40:57 +0000 Subject: [PATCH] Set email config --- config/environment.rb | 10 ---------- config/environments/development.rb | 2 ++ config/environments/production.rb | 13 +++++++++++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/config/environment.rb b/config/environment.rb index 29acad8..5dd7b37 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -4,13 +4,3 @@ require File.expand_path('../application', __FILE__) # Initialize the rails application Apollo::Application.initialize! -# SendGrid config for Heroku Cedar stack -ActionMailer::Base.smtp_settings = { - :address => 'smtp.sendgrid.net', - :port => '587', - :authentication => :plain, - :user_name => ENV['SENDGRID_USERNAME'], - :password => ENV['SENDGRID_PASSWORD'], - :domain => 'heroku.com', - :enable_starttls_auto => true -} diff --git a/config/environments/development.rb b/config/environments/development.rb index 8193158..c2d002b 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,6 +1,8 @@ Apollo::Application.configure do # Settings specified here will take precedence over those in config/application.rb + config.action_mailer.default_url_options = { :host => 'localhost:3000' } + # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. diff --git a/config/environments/production.rb b/config/environments/production.rb index 29da7bc..5789d81 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,5 +1,18 @@ Apollo::Application.configure do # Settings specified here will take precedence over those in config/application.rb + + config.action_mailer.default_url_options = { :host => 'tal-apollo-staging.herokuapp.com' } + + # SendGrid config for Heroku Cedar stack + ActionMailer::Base.smtp_settings = { + :address => 'smtp.sendgrid.net', + :port => '587', + :authentication => :plain, + :user_name => ENV['SENDGRID_USERNAME'], + :password => ENV['SENDGRID_PASSWORD'], + :domain => 'heroku.com', + :enable_starttls_auto => true + } # Code is not reloaded between requests config.cache_classes = true