Closed jendiamond closed 6 years ago
$ heroku auth:logout $ heroku addons:freate sendgrid:starter
heroku auth:logout
heroku addons:freate sendgrid:starter
$ heroku config:get SENDGRID_USERNAME $ heroku config:get SENDGRID_PASSWORD
heroku config:get SENDGRID_USERNAME
heroku config:get SENDGRID_PASSWORD
if Rails.env.development? ActionMailer::Base.delivery_method = :smtp 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 } end
https://github.com/laserlemon/figaro http://www.aimeemarieknight.com/how-to-get-devise-figaro-heroku-and-sendgrid-to-play-together-nice/
gem 'figaro'
bundle exec figaro install
create config/application.yml append .gitignore
Sendgrid
$
heroku auth:logout
$
heroku addons:freate sendgrid:starter
Enter your username and password
$
heroku config:get SENDGRID_USERNAME
$
heroku config:get SENDGRID_PASSWORD
Create a file in config/initializers named setup_mail.rb
Figaro
https://github.com/laserlemon/figaro
http://www.aimeemarieknight.com/how-to-get-devise-figaro-heroku-and-sendgrid-to-play-together-nice/
Add the figaro gem to your Gemfile
gem 'figaro'
$
bundle exec figaro install