Commit 3ee9c831db04485c602e496cd9b06e44c7c5e187

Authored by Dan Croak
1 parent 9efdfb91

mailer should use config vars

Showing 2 changed files with 15 additions and 11 deletions   Show diff stats
config/initializers/mail.rb
  1 +# Use config vars to get your Gmail credentials onto Heroku.
  2 +# They will be automatically picked up by this file in production.
  3 +
  4 +# heroku config:add GMAIL_EMAIL=dcroak@example.com GMAIL_PASSWORD=password
  5 +
1 require 'smtp-tls' 6 require 'smtp-tls'
2 7
3 ActionMailer::Base.smtp_settings = { 8 ActionMailer::Base.smtp_settings = {
4 :address => "smtp.gmail.com", 9 :address => "smtp.gmail.com",
5 :port => "587", 10 :port => "587",
6 :authentication => :plain, 11 :authentication => :plain,
7 - :user_name => "YOUREMAIL",  
8 - :password => "YOURPASSWORD" 12 + :user_name => ENV['GMAIL_EMAIL'],
  13 + :password => ENV['GMAIL_PASSWORD']
9 } 14 }
10 15
11 DO_NOT_REPLY = "donotreply@example.com" 16 DO_NOT_REPLY = "donotreply@example.com"
1 -# Use Heroku's config vars to get your S3 account keys into the cloud: 1 +# Use config vars to get your S3 credentials onto Heroku.
  2 +# They will be automatically picked up by this file in production.
2 3
3 # heroku config:add S3_KEY=8N029N81 S3_SECRET=9s83109d3+583493190 4 # heroku config:add S3_KEY=8N029N81 S3_SECRET=9s83109d3+583493190
4 5
5 -# They are then automatically picked up by this file. 6 +# Use the following example as your guide for S3 with Paperclip.
  7 +
  8 +# has_attached_file :avatar,
  9 +# :styles => { :thumbnail => "150x150" },
  10 +# :path => ":attachment/:id/:style.:extension",
  11 +# :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
6 12
7 development: &default 13 development: &default
8 access_key_id: <%= ENV['S3_KEY'] %> 14 access_key_id: <%= ENV['S3_KEY'] %>
@@ -17,10 +23,3 @@ production: @@ -17,10 +23,3 @@ production:
17 <<: *default 23 <<: *default
18 bucket: CHANGME_production 24 bucket: CHANGME_production
19 25
20 -# Use S3 with Paperclip using the following example as your guide.  
21 -  
22 -# has_attached_file :avatar,  
23 -# :styles => { :thumbnail => "150x150" },  
24 -# :path => ":attachment/:id/:style.:extension",  
25 -# :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",  
26 -